-
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. In some cases, partial batches will wait longer or shorter than the specified deadline. The odd one out right now is RabbitMQ which supports configuring a channel with a pre-fetch limit, but you still have to just consume messages one-by-one (the batching is all under the hood). Additionally, there doesn't seem to be a way to specify a timeout or deadline (apparently this is left up to individual clients to decide what makes the most sense). As such, RabbitMQ is under-served compared to the rest. The implementation for batch reads is entirely done in the client code (i.e. reading messages one-by-one, buffering them, then returning). One possible solution is to add a max prefetch config option and use this when initializing a consumer channel, but this would also mean the `max_messages` argument would be meaningless for RabbitMQ, and using `receive_all` at all would probably be irrelevant. Callers should probably just use `receive` instead. For now, I've left some comments in the rabbit impl and will leave this as future work.
- Loading branch information
1 parent
2479040
commit b7d6e51
Showing
11 changed files
with
961 additions
and
59 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
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.