Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michaelklishin/priority-consumer-examples
Examples that demonstrate various priority queueing scenarios with RabbitMQ, in Java
https://github.com/michaelklishin/priority-consumer-examples
Last synced: about 1 month ago
JSON representation
Examples that demonstrate various priority queueing scenarios with RabbitMQ, in Java
- Host: GitHub
- URL: https://github.com/michaelklishin/priority-consumer-examples
- Owner: michaelklishin
- License: mit
- Created: 2014-01-24T12:49:27.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-01-24T12:49:44.000Z (almost 11 years ago)
- Last Synced: 2024-05-08T19:22:11.181Z (6 months ago)
- Language: Java
- Size: 102 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Priority Queueing Examples
This repository contains some examples on how priority queueing
can be achieved with RabbitMQ (which as of early 2014 does not
support priorities).## Hi-Lo Priority Consumer
Many applications have a high volume rate of low priority tasks and
a low rate of high priority task, with the requirement that high
priority tasks are completed eventually without waiting for
the entire existing backlog of low priority tasks.To achieve this with RabbitMQ, use multiple queues (this example
uses two) with separate channels (or connections, if you want
to use separate thread pools for deliveries), and two queues, e.g.* `priorities.high`
* `priorities.low`Then add a consumer or multiple consumers to each queue.
[HiLoPriorityConsumers](./hilo-consumer/src/main/java/com/novemberain/consumers/HiLoPriorityConsumers.java) demonstrates this approach.
## License & Copyright
(c) Michael S. Klishin, 2014
Released under the [MIT license](http://opensource.org/licenses/MIT).