Skip to content

How does MaxBatch work with Streaming pull consumer & info on default consumerConfig values #883

Closed Answered by mtmk
YashasAnand asked this question in Q&A
Discussion options

You must be logged in to vote

By default consume() sets MaxMsgs (batch) to 1000. This value determines how many messages are expected from the server in every batch. This is called a pull request. With this flow control mechanism, client issues pull requests and server fulfils the request either by sending the amount of messages asked for or until the request times out, which is 30 seconds by default. One trick client does is to overlap the pull requests using the threshold settings (these default to half the batch size). When a threshold reached, client issues another pull request to keep the flow going uninterrupted.

In your case probably setting a lower batch value would help. it depends on how you're processing th…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by YashasAnand
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants