If you are familiar with EJB managed messages, then Spring MessageListenerContainer effectively replaces MDB. It gets its name because it is connected to a JMS subject / queue, as well as one JMS MessageListener, and it disconnects messages from this topic / queue and passes them to the MessageListener.
You are absolutely right that only one MessageListener can be registered in each container at a time, but consider that although the MessageListenerContainer code can be quite complex, it is actually a very lightweight runtime component. Do not be afraid to create multiple instances.
Also, make sure you select the appropriate MessageListener implementation for your situation. The simple and standard implementation is actually completely different, but none of them are "better."
skaffman
source share