3
votes

My deployment is like as shown below:

client -> relay server -> server

The relay server is a rabbitmq service which contains an exchange and many queues which are bound to this exchange. Any message pushed to this exchange with a mapping routing key will push the message to appropriate queue.

Now, my requirement is, when server is down I should avoid/block "relay server" from accepting any further messages.

Please help. Dead message queue didn't work.

2
I don't know anything about rabbitmq, but since nobody is responding in such a long while, I'll offer something that seems reasonable and doable regardless the technology: Have between the client and the relay server a redirecting server to pass on requests to the relay server if it's up (or if you tell it its up). The redirecting server should have 99.9% uptime, and all the updates and stuff can then be done on the relay server.SimpleVar

2 Answers

2
votes

I will try to answer your question as i am working with RabbitMQ currently. As far i know there is no way blocking messages to be pushed to queue. You have to achieve this programatically.

Step 1: Poll server for its running status before you want to push message to queue.

Step 2: If server is running go ahead pushing message to queue if not you know what you want to do.

Hope it helps you.

0
votes

server can create queues with the x-expires set which means:

How long a queue can be unused for before it is automatically deleted (milliseconds).

Thus, if server is down, the associated queue will be deleted and no messages will be queued.

See the documentation