I implemented a container that manages multiple instances of DefaultMessageListenerContainer (s), which it creates based on the prototype, if the listener. Based on the system property (value #), several listeners are created, and the queues that they listen to are numeric "my.Queue" + serial number. This, obviously, can be changed to look up queue names if necessary. However, this is not a dynamically expanding / shrinking list of listeners. They are created at the beginning, although I think you could use this as a starting point to make it more dynamic if you want.
I wrote a rather rudimentary unit test and a very rudimentary implementation (without multithreading), and it seems to work.
maven -
http://dl.dropbox.com/u/7812537/StackOverflowMultipleListeners.zip
- - http://forum.springsource.org/showthread.php?t=69604
, , bean factory, , .