You should use ConsumerRebalanceListener to check if there is a rebalance or not. Seeing same assigned partitions after each poll doesn't mean there is no rebalance.
Steve On Wed, Aug 1, 2018, 8:57 AM Manoj Khangaonkar <khangaon...@gmail.com> wrote: > Hi, > > I am implementing flow control by > > (1) using the pause(partitions) method on the consumer to stop > consumer.poll from returning messages. > > (2) using the resume(partitions) method on the consumer to let > consumer.poll return messages > > This works well for a while. Several sets of pause-resume work as > expected. > > But after a while I am seeing that the paused consumer starts returning > messages WITHOUT my code calling resume. > > There are no changes in the partitions assigned to consumer. I know this > because I logs the assigned partitions after every consumer.poll(...). That > should rule out a rebalance. > > Is there something that I am missing here ? > > Is there something more required to pause a consumer from retrieving > message ? > > regards > > > -- > http://khangaonkar.blogspot.com/ >