nats.rs icon indicating copy to clipboard operation
nats.rs copied to clipboard

Optimize JetStream Pull consumer to use max bytes instead of pending messages

Open Jarema opened this issue 1 year ago • 0 comments

Use Case:

Pull Consumers optimed (consumer.messages()) and customizable (consumer.stream()) modes should use max_bytes as a way of optimizing throughput, as a more meaningful way of throttling messages.

Proposed Change:

prioritize max_bytes over pending messages when deciding to send or not the next fetch request.

Who Benefits From The Change(s)?

both users utilizing default use case and the more advanced once, tweaking the setup.

Alternative Approaches

rely on current behaviour.

Jarema avatar Oct 18 '22 10:10 Jarema