RabbitMQ back up messages in specific queue
Asked Answered
C

2

6

I have a service that consumes messages from a RabbitMQ queue (posting to the queue is done through a topic exchange). Assuming that the service can theoretically fail and lose its state, possibility to back up all the messages for disaster recovery would come in handy.

The first idea that comes to mind is adding another binding for the topic exchange so that the messages are also posted to another queue, and creating a custom service for backing up messages that would listen on that queue. But this sounds much like a potential reinvention of the wheel. Is there a simpler way to do this with RabbitMQ (plugin/existing service/etc)?

Cuba answered 14/10, 2014 at 21:41 Comment(0)
C
2

Found out that it's possible to do with a combination of a firehose and a tracing plugin.

Cuba answered 21/10, 2014 at 16:53 Comment(0)
V
0

RabbitMQ cluster, as specified in Clustering Guide and Highly Available Queues will do what you want in the right way.

Vestige answered 15/10, 2014 at 5:43 Comment(2)
I don't think we're talking about the same thing. It's not the RabbitMQ whose failure or availability I'm concerned with. I want to basically back up traffic going through certain queues for future, not to solve any immediate availability problems.Cuba
Then duplicating messages to backup queue as you noted in question is the most appropriate way. P.S. "service can theoretically fail" in question really sounds like broker failure. If not - please specify what do you mean.Vestige

© 2022 - 2024 — McMap. All rights reserved.