dropwizard-kafka icon indicating copy to clipboard operation
dropwizard-kafka copied to clipboard

New undocumented constructor for Consumer

Open alexandernajafi opened this issue 2 years ago • 1 comments

The KafkaConsumerBundle does not have any empty constructor, but one that takes a Collection<String> topics and a ConsumerRebalanceListener.

It does not seem like the topics actually does anything as I still, manually have to call subscribe / unsubscribe in my consumer. Is this correct?

Also, could someone please provide some documentation on what to implement in the ConsumerRebalanceListener. It has two methods, but is it OK to leave them empty? Do I have to do some manual commit of offsets here?

new ConsumerRebalanceListener() {
              @Override
              public void onPartitionsRevoked(final Collection<TopicPartition> collection) {
                // Intentionally empty
              }

              @Override
              public void onPartitionsAssigned(final Collection<TopicPartition> collection) {
                // Intentionally empty
              }
            }

alexandernajafi avatar Jan 18 '22 15:01 alexandernajafi

Same here, anyone could help? Or should I move to Springboot?

love1491 avatar Jul 07 '22 09:07 love1491