-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add numMessagesInQueue and getAvailablePermits for PartitionedConsumer #72
Conversation
CLA is valid! |
@@ -398,6 +398,14 @@ public boolean isBatchingAckTrackerEmpty() { | |||
return consumers; | |||
} | |||
|
|||
public int getAvailablePermits() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The interface for these 2 methods could also be added to ConsumerBase
abstract class, to avoid need to downcast and checking the type of the consumer implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
@sschepens I'm seeing there is a test failure here that appears to be intermittent and related to the per-message redelivery change :
I think the receive timeouts of 10ms are too low and can lead to this spurious errors, especially in Travis which runs the test in a Docker container and it appears to lead to very funny timing issues. Try to raise that to at least 100ms. |
@merlimat will do |
2731497
to
8ec9f88
Compare
* More graceful warning when args are missing * Make use of Annotations * Tests work
* [feat][elasticsearch] Add hashed id support * add config default test (cherry picked from commit 4fdb34e)
* [feat][elasticsearch] Add hashed id support * add config default test
Motivation
Allow a partitioned consumer to get the available messages to consume
Modifications
Added
numMessagesInQueue
andgetAvailablePermits
forPartitionedConsumer
Result
A Partitioned consumer can now get the amount of messages it has to consume.