Method and device for distributing messages
The invention discloses a method and device for distributing messages, and relates to the technical field of intelligent cloud, in particular to the technical field of cloud computing. The method comprises: using a single agent process to obtain a message queue of a message distribution process; ana...
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention discloses a method and device for distributing messages, and relates to the technical field of intelligent cloud, in particular to the technical field of cloud computing. The method comprises: using a single agent process to obtain a message queue of a message distribution process; analyzing a preset label of each message in the message queue; if the preset label indicates that the message is a message in the message sequence, sorting the messages in the message sequence to obtain a sorted message sequence; and distributing the messages in the sorted message sequence. According to the scheme, the orderliness of the messages in the message queue can be guaranteed, the messages in the message queue can be processed according to the sequence, and service exception is avoided.
本申请公开了一种用于分发消息的方法和装置,涉及智能云技术领域,具体涉及云计算技术领域。具体实现方案为:采用单个代理进程获取消息分发进程的消息队列;解析消息队列中各条消息的预设标签;若预设标签指示消息是消息序列中的消息,则排序消息序列中的消息,得到排序后的消息序列;对排序后的消息序列中的消息进行分发。该方案可以保证消息队列中消息的有序性,支持按照顺序处理消息队列中的消息,避免业务发生异常。 |
---|