Introducing a dependency maven
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-amqp</artifactId> <version>2.0.3.RELEASE</version> </dependency>
2 dead letter into the condition of the columns
Expired messages, basic.nack or basic.reject and default-requeue-rejected parameter is false or queue full message to enter the exchanger
Dead letter queue is achieved by binding the dead letter queue exchanger
Dead-letter--X Exchange: Binding badmail exchanger (actually ordinary switch, regardless of the type)
X -dead-Letter-routing-Key: Binding routing keys dead letter queue (optional)
references:
https://www.jianshu.com/p/451958b1adca