RabbitMQ messaging three levels of protection

Here only a brief three levels, notes excerpt from "RabbitMQ combat Guide" ZHU Zhong-hua Author

 

The message is generally reliable transmission system access messaging middleware business problems when the primary consideration, messaging middleware to protect the general message is divided into three levels

1 At most once. At most once, messages may be lost, but will not be repeated transmission

2 At least once. At least once, the message will not be lost, but may be repeated transmission.

3 Exactly once. Exactly once, each message will certainly be transmitted once and only once transmission.

 

RabbitMQ supports only 1, and 2 for 3, only not supported, the general is to use a second, at least once, the message is not lost sleep, and then to repeat the news

RabbitMQ also temporarily do not have to re-transfer mechanism to ensure exactly once, can only be implemented in the client, such as the introduction of the concept of GUID (Globally Unique Identifier) ​​is.

For the GUID, if the de-emphasis from the perspective of the client, then the need to introduce a centralized cache, will increase the complexity of the dependency, it is difficult to further define the size of the cache,

It recommended in the actual production environment, according to their business parties to heavy traffic characteristics, such as business idempotent message itself, or by means of other tools like Redis to weight.

Guess you like

Origin www.cnblogs.com/Koaler/p/11982198.html