+

Search Tips   |   Advanced Search

JMS request and reply messaging with cluster bus members

A typical JMS messaging pattern involves a requesting application that sends a message to a JMS queue for processing by a messaging service, for example, a message-driven bean.

When the requesting application sends the request message, the message identifies another JMS queue to which the service should send a reply message. After sending the request message, the requesting application either waits for the reply message to arrive, or it reconnects later to retrieve the reply message.

Figure 1. Typical JMS messaging pattern

The request and reply pattern requires the following conditions:

A JMS queue can refer to a service integration bus destination defined on a server bus member or cluster bus member.

Figure 2. A service integration bus queue destination defined to an application server bus member

The following behavior occurs by default:

This request and reply behavior allows a reply message to be sent to a different queue point from the one on which the requester is waiting for it. This can result in the reply message not being received.

Figure 3. A service integration bus queue destination defined to a cluster bus member with two messaging engines

To overcome this situation, there are various options when you configure the service integration bus system or the JMS applications:

Consider the advantages and disadvantages of each option and the requirements of the application, before you choose an approach.


Summary

Use the simplest solution that satisfies the requirements of the request/reply scenario. For example:

If necessary, we can combine these options to achieve the solution that best satisfies the requirements of the application and has the best performance and scalability.

For example, if requesting applications typically receive their reply messages during the initial connection but under certain rare conditions (for example, a failure) they have to reconnect to receive the reply, the following approach might be suitable:

This approach enables dynamic workload balancing of the requesting applications and minimizes the performance implications of message gathering by reducing its use to failure scenarios.


Subtopics


Related concepts

  • Workload sharing with queue destinations