-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dead letter exchanges and queues to rabbitmq
There is a need from the govuk-chat app to be able to control the amount of delay that is used when a message from the govuk_chat_pulished_documents is retried. At the moment, a message will be retried immediately. The desired outcome is that we could have a message be sent away for a fixed amount of time before it is back in the queue. The way we do this is we set a dead letter exchange for the govuk_chat_published_documents called govuk_chat_retry_dlx This dlx then send all incoming messages to a queue called govuk_chat_retry. this queue has a message-ttl value set and a dead letter exchange set to an exchange called govuk_chat_dlx. This last exchange route all incoming messages back to govuk_chat_published_documents. The result of all this is that when a message is rejected in govuk_chat_published_documents, it ends up in the govuk_chat_retry queue, it will then wait here for the message-ttl value before expiring. After expiration it is sent back to govuk_chat_published_documents.
- Loading branch information
roch
committed
Jul 10, 2024
1 parent
02143c9
commit 0e5d205
Showing
2 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters