Websphere Multithreaded Message Queue

We are a back-end processor and program JMS MQ. We have 2 lines. one is used to receive the message, and the other to send the message. All banking users will send messages to Q1 through their IB, MB, etc. We receive messages from Q1 and process them, and we send a message to Q2.

We currently do not use multithreading for this. Whether we can use multithreading for this or one thread is enough for this. because we receive messages from Q1 one by one and process it.

Please come back to me if the question is not clear. Please help me.

+5
source share
1 answer

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.

+5
source

Source: https://habr.com/ru/post/1263301/


All Articles