tags:

views:

93

answers:

1

I have been reading up on the SimpleMessageListenerContainer to ease the pain of subscribing to a topic asynchronously. However, I cannot find a way to trigger a callback or loop through the messages that the container has received. Can someone point me in the right direction (documentation, examples, etc)?

+1  A: 

See 19.4.2. Asynchronous Reception - Message-Driven POJOs section of the (2.5+) reference.

You need to create a message listener bean which implements MessageListener which has a method called onMessage()

Paul McKenzie
Well I understand the listener interface. However, I have 3 topics one particular class needs to be aware of incoming messages. Would it be best to just have that class implement the onMessage() and have three different containers? Or what would be best practice?
predhme