I have some code after the consumer consumes, right now since the message queue is asynchronous the flow will continue even if the message is not consumed by the consumer. I want to wait till the consumer receives the message and till then the flow needs to be paused. Is there any way to do it? I'm using RabbitMQ Java implementation and I'm using topic exchange.
pausing the flow, do you mean the producer should stop producing until the consumer consumes? If so, queue based messaging is the wrong fit for your problem - you want an RPC style integration like REST or SOAP. - StuartLC