官术网_书友最值得收藏!

Priority queue

There is often a need when messages with higher importance should be given priority in processing compared to general messages with lower priority. This pattern is important for applications that provide different service level agreements (SLA) to consumers, which provide services based on different plans and subscriptions.

Queues follow first-in, first-out patterns. Messages are processed in sequence. However, with the help of this pattern, it is possible to fast-track processing of certain messages due to their higher priority. There are multiple ways to implement it. If the queue provides the capability of assigning priority and based on priority re-order messages, then even a single queue is enough to implement this pattern.

However, if the queue does not have the capability to re-order messages, then separate queues can be created for different priorities and each queue can have separate consumers associated with it.

In fact, this pattern can reuse competing consumer patterns if needed to fast-track processing of messages from each queue using multiple consumers.

主站蜘蛛池模板: 天气| 通辽市| 夏津县| 嘉黎县| 肇东市| 绥芬河市| 黄浦区| 阿克苏市| 峨眉山市| 孟津县| 东源县| 集贤县| 邛崃市| 舟曲县| 饶河县| 永州市| 高州市| 通化县| 怀集县| 上林县| 曲阳县| 通州市| 汝南县| 共和县| 陆良县| 古丈县| 宜黄县| 大足县| 水富县| 准格尔旗| 长白| 阿巴嘎旗| 嫩江县| 甘南县| 凤凰县| 仙桃市| 册亨县| 保亭| 海伦市| 新河县| 肥城市|