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

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.

主站蜘蛛池模板: 策勒县| 鄂尔多斯市| 南投县| 永兴县| 马公市| 临江市| 临武县| 垣曲县| 宜兰市| 夏邑县| 萝北县| 邹城市| 南靖县| 靖边县| 荔浦县| 奉新县| 罗江县| 黎城县| 金乡县| 古蔺县| 青河县| 会泽县| 扎囊县| 浮山县| 铜鼓县| 肥西县| 新宁县| 固原市| 平安县| 沽源县| 苏尼特右旗| 利津县| 浦东新区| 长沙县| 遂川县| 乌拉特前旗| 衡南县| 泗水县| 安丘市| 满城县| 刚察县|