Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize consumer messages sequences for multiple subjects (#4129)
If consumer with multiple subjects encountered a sequnece of messages in a row from the same subject, it tried to load messages from other subjects in some cases. This checks for that scenario and optimizes it by early returning. I added a temporary instrumentation to check for how many times fetching new messages is called, and it seems that it cuts those calls according to assumptions. Though it being internal, it's really hard to show that in test. Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
- Loading branch information