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

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.

主站蜘蛛池模板: 隆林| 翁牛特旗| 罗甸县| 凤山市| 措美县| 精河县| 宁德市| 萝北县| 涞水县| 班戈县| 崇信县| 峡江县| 余庆县| 潮安县| 汶上县| 九台市| 秦皇岛市| 泸定县| 客服| 巫溪县| 会宁县| 射阳县| 麻栗坡县| 淮南市| 思茅市| 印江| 常德市| 岗巴县| 香港| 商都县| 南川市| 盐源县| 隆化县| 乌兰察布市| 长丰县| 清流县| 怀柔区| 同德县| 剑阁县| 建宁县| 张掖市|