-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for batched reads is not uniform among the various backends we have. The in-memory and rabbitmq impls differ from the rest as these consumers are channel/stream based, with no explicit option for consuming messages in batches. Using `tokio::time::timeout` for the first item, then looping to opportunistically try to fill up the batch with any remaining _already ready_ messages, we can emulate a similar behavior as the other backends. In all cases, receive_all should: - not block longer (+/-) than the specified deadline, even if no items are available. - not linger waiting for _more items_ once it as received _any_. Additionally, a new bit of config has been exposed for rabbitmq so callers can specify a prefetch count. This didn't seem to have any impact on the tests, but seems good to have.
- Loading branch information
1 parent
2479040
commit 48f7ad8
Showing
12 changed files
with
1,073 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.