Arpel
Arpel

Reputation: 1

Is there a way to judge whether all the events have been consumed?

Is there a way to judge whether all the events have been consumed? Similar to the BlockingQueue.isEmpty() method. I want to add some business logic when consumers are idle. Looking forward to your reply.

Upvotes: 0

Views: 96

Answers (1)

Sam Turtel Barker
Sam Turtel Barker

Reputation: 843

Yes, the ringbuffer has remainingCapacity which tells you how many slots remain free. So you would then need to compare that to the capacity of the ring buffer to check if its empty.

Upvotes: 1

Related Questions