You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched in the issues and found nothing similar.
Version
OS: Debian GNU/Linux
version 11 (Bullseye)
pulsar version 3.0.13
Minimal reproduce step
Use pulsar-client python library 3.1.0
initialise a BatchConsumerPolicy on n different partitions of the same topic with timeout = -1 , max_num_bytes = -1, max_num_message = 400
and then subscribe to partitions with this policy and begin consuming using batch_receive() method
What did you expect to see?
Expected that the consumption of messages from any partition will happen normally (wait for the max num and then return)
What did you see instead?
It was observed that the batch_receive() method got permanently stuck after a few days. Restarting the python program mitigated the issue. Another python program running a different subscription on the same topic with BatchConsumerPolicy(max_num_message=-1,max_num_bytes=-1,timeout=1second) ran perfectly without any issues and the topic was such that there would be 0 produce at most a few minutes in a couple of days. Whenever the first process got stuck, the second one never got stuck. The first one got stuck at seemingly irregular patterns but definitely eventually.
Another point to note is that this was the only difference between both of them.
Following this observation I changed the BatchConsumerPolicy from BatchConsumerPolicy(max_num_message=400,max_num_bytes=-1,timeout=-1) to BatchConsumerPolicy(max_num_message=-1,max_num_bytes=-1,timeout=50ms) and then that process never got stuck (3 months in now)
Activity