- Every queue has its dead letter queue
- Dead letter messages are routed directly to the dead letter queue, not via bindings
- Dead letter queues are lazy to save resources
This is different to the rabbitmq-concept which recommends to use a separate exchange to route the dead letter messages.
- x-dead-letter-exchange=
- x-dead-letter-routing-key=DLQ-Name
- x-queue-mode=lazy
Run the following command to start a container which creates example-queues and sends messages to them. It tries to connect to a rabbitmq-server on localhost with username "guest" and password "guest".
docker run \
-d \
--name=spring-rabbitmq-dead-letter-queue-example \
-p 8080:8080 \
jeggers/spring-rabbitmq-dead-letter-queue-example:latest \
--spring.rabbitmq.addresses=localhost \
--spring.rabbitmq.username=guest \
--spring.rabbitmq.password=guest
mvn clean package dockerfile:build
mvn clean package dockerfile:build dockerfile:tag@tag-latest dockerfile:tag@tag-version dockerfile:push@push-latest dockerfile:push@push-version github-release:release