When there is an asynchronous listener on a JMS queue, a new thread is spawned to handle each new message being passed to the queue.

Kishan A

No, a new thread is not spawned to handle each new message being passed to the queue. A session can handle only one message at a time, i.e, it is a single thread of execution. While one message is being processed, all the other messages need to wait. To have messages delivered concurrently, you need to have multiple sessions. See Sections 4.4.16 and 4.4.17 of the JMS 1.0.2 specification.

There is an advanced feature of JMS for concurrent processing of a subscription's message. This is an optional feature that is expected to be supported only by sophisticated JMS providers.
See Section 8.2 of the specification for a detailed explanation of what it means.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact