RabbitMQ series tutorial 5: How RabbitMQ guarantees reliable delivery of messages

Insert picture description here

Introduction

A message often goes through the following stages,
Insert picture description here
so to ensure the reliable delivery of the message, you only need to ensure the reliable delivery of these three stages.

Production stage

Reliable delivery at this stage mainly relies on ConfirmListener (publisher confirmation) and ReturnListener (failure notification).
As mentioned earlier, the flow of a message in RabbitMQ is
producer -> rabbitmq broker cluster -> exchange -> queue -> consumer

ConfirmListener can get whether the message is sent from the producer to the broker
ReturnListener can get the message that cannot be routed from the exchange to the queue

I use Spring Boot Starter's api to demonstrate the effect

application.yaml

spring:
  rabbitmq:
    host

Guess you like

Origin blog.csdn.net/zzti_erlie/article/details/108954361