I have a CRUD like service which have REST HTTP API. This service have two instances - only one recieving request at time. If first instance starts throwing exceptions or slowing down we change load balancer rule to send requests to second instance. Now I wanted to add some AMPQ messaging type handler to this service. So there is any way to achieve this kind of solution which I mention above in this kind of type of communication ? I like to stop recieving messages from queue when I decide to do it.

  • Do you want to switch message consumers if one consumer gets slowed down or experiences problems? Is that what you are asking? Jul 25, 2018 at 0:45

1 Answer 1


If you mean that you want to change the routing of messages on the fly. That can be tricky.

You would need a custom routing step pulling messages from a single queue and then posting them to one or more other queues depending on your setting.

However, if you simply have two services pulling from the same queue, if one needs to be stopped you can just stop it and the second will continue to process all the messages.

  • Yes, Im looking for some kind of load balancer for messaging. Jul 25, 2018 at 17:43
  • you dont need a load balancer for messaging because the servers pull from the queue rather than having requests pushed to them
    – Ewan
    Jul 25, 2018 at 18:53
  • but I want to stop pulling it like Im stoping receving requests when I switch LB to another server Jul 25, 2018 at 19:21
  • just turn the service off
    – Ewan
    Jul 25, 2018 at 19:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.