Spring's JMS Design Question : Decouple processing of messages

Posted by java_pill on Stack Overflow See other posts from Stack Overflow or by java_pill
Published on 2010-04-13T02:06:14Z Indexed on 2010/04/13 2:13 UTC
Read the original article Hit count: 343

Filed under:
|

I'm using a message listener to process some messages from MQ based on Spring's DefaultMessageListenerContainer. After I receive a message, I have to make a Web Service (WS) call. However, I don't want to do this in the onMessage method because it would block the onMessage method until the invocation of WS is successful and this introduces latency in dequeuing of messages from the queue. How can I decouple the invocation of the Web Service by calling it outside of the onMesage method or without impacting the dequeuing of messages?

Thanks,

© Stack Overflow or respective owner

Related posts about spring

Related posts about jms