Reputation: 39
Is there any way you can programmatically control to start/stop apache consumer?
There are pause and resume but looks like it is not working as expected
Upvotes: 1
Views: 759
Reputation: 1127
Messages received from the broker are buffered in the consumer receiverQueue
. The pause
method of the consumer will make it stop asking for more messages from the broker. So the messages you get are probably the ones buffered into the receiverQueue. From your application perspective, you'll stop receiving messages once the receiver queue is drained.
Upvotes: 2