Yes, JMS allows you to use multiple readers in the same queue. You can do this by multithreading, multiple application instances, or a send level that retrieves messages and then passes them to the handler via a callback or other mechanism.
However, the application must support this. For example, if two messages are connected and must be processed in order, the order is not preserved if there is more than one listener in the queue. This is one of the reasons why asynchronous messaging templates prefer messages to not have dependencies or order similarities.
If you use multithreading, it is important to monitor the integrity of transactions. If several threads use the same connection, and one of them calls COMMIT , after which it sends all outstanding messages in all threads that use this connection.
source share