How to remove messages from target cluster in blue/green deployment when message is ack in source cluster? #14893
Replies: 2 comments 2 replies
-
|
The plugin you're looking for is shovel https://www.rabbitmq.com/docs/shovel |
Beta Was this translation helpful? Give feedback.
-
|
Queue federation will gradually move messages as the Blue-Green Deployment doc guide plus a blog post on the topic from 2025 explain. You can use shovels and create them programmatically, then delete them programmatically (or decommission the entire original cluster) but Blue-Green Deployments usually rely on queue federation. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Community Support Policy
RabbitMQ version used
other (please specify)
Erlang version used
26.1.x
Operating system (distribution) used
RPM/DEB
How is RabbitMQ deployed?
Generic binary package
rabbitmq-diagnostics status output
See https://www.rabbitmq.com/docs/cli to learn how to use rabbitmq-diagnostics
Logs from node 1 (with sensitive values edited out)
See https://www.rabbitmq.com/docs/logging to learn how to collect logs
Logs from node 2 (if applicable, with sensitive values edited out)
See https://www.rabbitmq.com/docs/logging to learn how to collect logs
Logs from node 3 (if applicable, with sensitive values edited out)
See https://www.rabbitmq.com/docs/logging to learn how to collect logs
rabbitmq.conf
See https://www.rabbitmq.com/docs/configure#config-location to learn how to find rabbitmq.conf file location
Steps to deploy RabbitMQ cluster
Donwload tar.gz on each node and run and form cluster
Steps to reproduce the behavior in question
enable rabbitmq_federation plugin, publish and ack message
advanced.config
See https://www.rabbitmq.com/docs/configure#config-location to learn how to find advanced.config file location
Application code
# PASTE CODE HERE, BETWEEN BACKTICKSKubernetes deployment file
What problem are you trying to solve?
I am currently running a blue/green deployment with RabbitMQ, consisting of 3 nodes in each cluster. I have set up federation between both clusters using the rabbitmq_federation plugin.
My requirement is to remove a message from the target cluster once it has been acknowledged in the source cluster. I realize that the rabbitmq_federation plugin is not designed to handle this, as it creates a separate copy of the message and sends it to the target cluster, resulting in two independent messages.
I am aware that setting up a message TTL on the target cluster can control this, but I am specifically looking for a solution that allows the removal of messages from the target cluster once they are acknowledged in the source cluster, without relying on message TTL.
Is there any alternative approach or plugin that can help achieve this? Or any recommended best practices to fulfill this requirement?
Thank you for your help!
Beta Was this translation helpful? Give feedback.
All reactions