@Test public void testGetBrokerConfig() { final String brokerId = "1"; final BrokerConfig brokerConfig = kafkaOperations.getBrokerConfig(brokerId); assertNotNull("non-null response", brokerConfig); assertFalse("Should not be empty", brokerConfig.getConfigEntries().isEmpty()); for (final ConfigItem configItem: brokerConfig.getConfigEntries()) { assertNotNull(configItem.getName()); } }
public BrokerConfig getBrokerConfig(final String brokerId) { final ConfigResource configResource = new ConfigResource(ConfigResource.Type.BROKER, brokerId); return new BrokerConfig(describeResource(configResource)); }
KafkaOperations implements AutoCloseable { public BrokerConfig getBrokerConfig(final String brokerId) { final ConfigResource configResource = new ConfigResource(ConfigResource.Type.BROKER, brokerId); return new BrokerConfig(describeResource(configResource)); } }
KafkaOperations implements AutoCloseable { public BrokerConfig getBrokerConfig(final String brokerId) { final ConfigResource configResource = new ConfigResource(ConfigResource.Type.BROKER, brokerId); return new BrokerConfig(describeResource(configResource)); } KafkaOperations(final AdminClient adminClient, final KafkaConsumer<String, String> consumerClient); }
KafkaOperations implements AutoCloseable { public BrokerConfig getBrokerConfig(final String brokerId) { final ConfigResource configResource = new ConfigResource(ConfigResource.Type.BROKER, brokerId); return new BrokerConfig(describeResource(configResource)); } KafkaOperations(final AdminClient adminClient, final KafkaConsumer<String, String> consumerClient); TopicList getAvailableTopics(); NodeList getClusterNodes(); Map<String, TopicDetails> getTopicDetails(final Collection<String> topics); TopicDetails getTopicDetails(final String topic); TopicConfig getTopicConfig(final String topic); BrokerConfig getBrokerConfig(final String brokerId); boolean createTopic(final CreateTopic createTopic); TopicConfig alterTopicConfig(final String topic, final Map<String, String> configItems); boolean removeTopic(final String topic); List<ConsumerGroupIdentifier> listConsumers(); boolean removeConsumerGroup(final String id); ConsumerGroupDetails getConsumerGroupDetails(final String consumerGroupId); List<ConsumerGroupDetails> getConsumerGroupDetails(final List<String> consumerGroupIds); ConsumerGroupOffsets getConsumerGroupOffsets(final String consumerGroupId); ConsumerGroupOffsetsWithTailPositions getConsumerGroupOffsetsWithTailOffsets(final String consumerGroupId); TailOffsets getTailOffsets(final String topic); TailOffsets getTailOffsets(final String topic, final Collection<Integer> partitions); void close(); }
KafkaOperations implements AutoCloseable { public BrokerConfig getBrokerConfig(final String brokerId) { final ConfigResource configResource = new ConfigResource(ConfigResource.Type.BROKER, brokerId); return new BrokerConfig(describeResource(configResource)); } KafkaOperations(final AdminClient adminClient, final KafkaConsumer<String, String> consumerClient); TopicList getAvailableTopics(); NodeList getClusterNodes(); Map<String, TopicDetails> getTopicDetails(final Collection<String> topics); TopicDetails getTopicDetails(final String topic); TopicConfig getTopicConfig(final String topic); BrokerConfig getBrokerConfig(final String brokerId); boolean createTopic(final CreateTopic createTopic); TopicConfig alterTopicConfig(final String topic, final Map<String, String> configItems); boolean removeTopic(final String topic); List<ConsumerGroupIdentifier> listConsumers(); boolean removeConsumerGroup(final String id); ConsumerGroupDetails getConsumerGroupDetails(final String consumerGroupId); List<ConsumerGroupDetails> getConsumerGroupDetails(final List<String> consumerGroupIds); ConsumerGroupOffsets getConsumerGroupOffsets(final String consumerGroupId); ConsumerGroupOffsetsWithTailPositions getConsumerGroupOffsetsWithTailOffsets(final String consumerGroupId); TailOffsets getTailOffsets(final String topic); TailOffsets getTailOffsets(final String topic, final Collection<Integer> partitions); void close();  }