Two RabbitMQ clusters use two-way federation exchange to replicate messages, but how to achieve consume messages synchronously?

Viewed 134

Two RabbitMQ clusters use two-way federation exchange to replicate messages, but how to achieve consume messages synchronously?

I use a consumer to consume messages in one cluster and messages in one cluster will be deleted, but in another cluster the messages are still there. How can I achieve that when I use a consumer to consume messages? In both two cluster the messages will be deleted.

1 Answers

Federation only copies messages, it does not copy actions on those messages. They will remain in the other cluster until they are consumed or deleted.

One option would be to set a message TTL for the other queue so that the messages will be automatically deleted after a certain period of time.


NOTE: the RabbitMQ team monitors the rabbitmq-users mailing list and only sometimes answers questions on StackOverflow.

Related