Message queue consumption method and apparatus
Embodiments of the present invention provide a message queue consumption method and apparatus. The method comprises the following steps: allocating a service serial number to each service message sentby a producer, wherein the service message carries a service identifier; after the consumer obtains...
Gespeichert in:
Hauptverfasser: | , , |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | Embodiments of the present invention provide a message queue consumption method and apparatus. The method comprises the following steps: allocating a service serial number to each service message sentby a producer, wherein the service message carries a service identifier; after the consumer obtains the service message from the message queue, analyzing the service identifier and the service serialnumber of the service message, and generating the travel value of the service message according to the service identifier and the service serial number; querying a message record database for the presence or absence of the travel value; cancelling or consuming the service message according to the query result. The embodiment of the invention can effectively process the duplicate message while ensuring the high concurrency of the message queue at the sending end by canceling the consumption of the duplicate message at the consuming end.
本发明实施例提供种消息队列的消费方法和装置。所述方法包括:为生产者发送的每条业务消息分配个业务流水号,所述业务消息携带业务标识;在消费者从消息队列中获取业务消息之后, |
---|