Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dead letter exchanges and queues to rabbitmq #1834

Merged
merged 2 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,31 @@
},
"priority": 0
},
{
"vhost": "publishing",
"name": "govuk_chat_retry_dlx",
"pattern": "govuk_chat_published_documents",
"apply-to": "queues",
"definition": {
"dead-letter-exchange": "govuk_chat_retry_dlx",
"ha-mode": "all",
"ha-sync-mode": "automatic"
},
"priority": 0
},
{
"vhost": "publishing",
"name": "govuk_chat_retry",
"pattern": "govuk_chat_retry",
"apply-to": "queues",
"definition": {
"dead-letter-exchange": "govuk_chat_dlx",
"message-ttl":"${govuk_chat_retry_message-ttl}",
"ha-mode": "all",
"ha-sync-mode": "automatic"
},
"priority": 0
},
{
"vhost": "publishing",
"name": "ha-all",
Expand Down Expand Up @@ -210,6 +235,13 @@
"auto_delete": false,
"arguments": {}
},
{
"name": "govuk_chat_retry",
"vhost": "publishing",
"durable": true,
"auto_delete": false,
"arguments": {}
},
{
"name": "email_unpublishing",
"vhost": "publishing",
Expand All @@ -228,6 +260,24 @@
"internal": false,
"arguments": {}
},
{
"name": "govuk_chat_retry_dlx",
"vhost": "publishing",
"type": "topic",
"durable": true,
"auto_delete": false,
"internal": false,
"arguments": {}
},
{
"name": "govuk_chat_dlx",
"vhost": "publishing",
"type": "topic",
"durable": true,
"auto_delete": false,
"internal": false,
"arguments": {}
},
{
"name": "content_data_api_dlx",
"vhost": "publishing",
Expand Down Expand Up @@ -414,6 +464,22 @@
"destination_type": "queue",
"routing_key": "*.unpublish.#",
"arguments": {}
},
{
"source": "govuk_chat_retry_dlx",
"vhost": "publishing",
"destination": "govuk_chat_retry",
"destination_type": "queue",
"routing_key": "#",
"arguments": {}
},
{
"source": "govuk_chat_dlx",
"vhost": "publishing",
"destination": "govuk_chat_published_documents",
"destination_type": "queue",
"routing_key": "#",
"arguments": {}
}
]
}
6 changes: 6 additions & 0 deletions terraform/projects/app-publishing-amazonmq/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ variable "publishing_amazonmq_broker_name" {
default = "PublishingMQ"
}

variable "govuk_chat_retry_message-ttl" {
type = string
description = "Time in miliseconds before messages in the govuk_chat_retry queue expires and are sent back to the govuk_chat_published_ducoments queue through the dead letter mechanism"
default = "300000"
}

variable "elb_internal_certname" {
type = string
description = "The ACM cert domain name to find the ARN of, so that it can be applied to the Network Load Balancer"
Expand Down
Loading