Reputation: 31
I need to convert synchronous message invocation into asynchronous if the request is running too long. If there a way to achieve this by using Spring AMQP client for RabbitMQ? Thanks.
Upvotes: 0
Views: 193
Reputation: 174494
You can hand off to another thread at any time in your code and the container thread will immediately ack the message. But the logic to do the hand off has to be in your listener.
If you want to control the ack, use mode MANUAL
and you'll need a SessionAwareMessageListener
so you have access to the Channel
to do the basicAck
.
Upvotes: 0