JMS multithreaded reception in Spring

I am trying to write a multi-threaded implementation for processing JMS messages from a queue.

I tried the classes DefaultMessageListenerContainer and SimpleMessageListenerContainer.

The problem is that it seems that only one instance of the MessageListener class gets the instance, no matter how I configure it. This forces me to unnecessarily write idle or thread-safe MessageListener implementations, since I have a ListenerContainer configured to use multiple threads (concurrentConsumers = 8).

Is there an obvious solution for this that I am missing?

+5
source share
3 answers

. MessageListener - , Spring - .

listListener

. MessageListener - , Spring .

+5
+3

"concurrentConsumers" . , "n" MessageListenerContainer. MessageListenerContainer "" . , , , , , /.

. "" JMS- Spring".

+1

All Articles