0
votes

I try to build a system with multiple servers messages exchange.

I have server called Master and another server called Slave. Master sends messages to Slave and Slave sends messages To Master asynchronously .

I have rabbitmq server on both servers and use federation plugin on both of them to get messages. So publishers and consumers on both servers communicate only with local rabbitmq server. And all messages exchanges between servers are done only with rabbitmq .

It works fine. When both servers are online.

My requirement is that when there is no network connection between servers then messages should be accomulated until a connection is back. And it doesn't work with federation plugin . If federation connection is not active then messages are not stored on local rabbitmq.

What should i do to have a model where messages can wait for connection to be delivered to other rabbitmq server?

Do i need to provide more info on my current model?

There is simpler description

RabbitMQ1 has exchange MASTER. RabbitMQ2 created federation with a link to RabbitMQ1 and assigned permissions to the exchange MASTER

Publisher writes to RabbitMQ1 to exchange MASTER with routing key 'myqueue'

Consumer listens RabbitMQ2 on exchange MASTER and queue 'myqueue'.

If there is connection then all works fine if no connection then messages posted to RabbitMQ1 are not delivered to RabbitMQ2 when connection is back.

How to solve this?

1

1 Answers

0
votes

I found the solution for this. Federation is not good plugin for such solution

I used shovel . It does exactly what i need