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

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.

主站蜘蛛池模板: 苏州市| 文水县| 固镇县| 淮阳县| 平果县| 盱眙县| 韩城市| 紫金县| 台南市| 平江县| 韩城市| 潮州市| 中山市| 临邑县| 南宁市| 罗江县| 太湖县| 宁安市| 滦南县| 马边| 宁化县| 友谊县| 兰坪| 象山县| 宣汉县| 邢台市| 宁津县| 台东县| 新巴尔虎左旗| 鹿邑县| 开平市| 洛扎县| 牡丹江市| 夏津县| 蒙山县| 霍山县| 苏尼特左旗| 大冶市| 资兴市| 营山县| 宁陵县|