Class KafkaAdminClient


  • public final class KafkaAdminClient
    extends Object
    • Method Detail

      • createConsumer

        public org.apache.kafka.clients.consumer.Consumer createConsumer​(String groupId,
                                                                         String topic)
      • createProducer

        public org.apache.kafka.clients.producer.Producer<Long,​String> createProducer()
      • consumeAndAssert

        public List<org.apache.kafka.clients.consumer.ConsumerRecord<String,​String>> consumeAndAssert​(String testName,
                                                                                                            org.apache.kafka.clients.consumer.Consumer consumer,
                                                                                                            int expectedEventCount,
                                                                                                            int furtherPolls)
                                                                                                     throws Exception
        1. Poll for messages on the application’s outbound topic. 2. Assert the expected number are received. 3. Performs the specified number of extra polls after the expected number received to ensure no further events. 4. Returns the consumed events.
        Throws:
        Exception