Configure the requester to consume messages from all queue points simultaneously
By default, a JMS message consumer consumes from only one queue point for the lifetime of the message consumer. If the reply queue has more than one queue point, unless the reply message is restricted to one particular queue point, the consumer might not be consuming from the queue point to which the reply is sent, and might not receive the reply message.
However, we can configure the JMS queue used by the message consumer to allow the message consumer to simultaneously consume from all queue points of the identified service integration bus queue, irrespective of which messaging engine the requesting application is connected to.
The JMS queue option for this is Message visibility. If we enable Message visibility (Message gathering), we do not have to restrict the location of the reply message, as the reply message is visible whichever messaging engine the requesting application is connected to (see Related tasks for more details).
In the following figure, a consuming application connects to a messaging engine that has message visibility enabled but no local queue point. The associated queue point consumes messages from all available queue points of a destination and makes them available to the consumer.
Figure 1. Message visibility: messages are consumed from all queue points
Advantages:
- It is simple to configure.
- Requesting applications can be dynamically workload balanced across the messaging engines in the bus member.
- The requesting application can disconnect and re-connect to different messaging engines (even messaging engines outside the bus member that owns the reply queue) without the risk of failing to find the reply message.
Disadvantages:
- Gathering messages from multiple queue points is a very performance-intensive operation, even when messages are available on the local queue point. Enable Message visibility might reduce the overall performance of the messaging system, if sufficient message gathering is being performed.
- Monitor gathering consuming applications is complex when Message visibility is enabled because messages can be assigned to gathering consumers for extended periods of time.
Related concepts
JMS request and reply messaging with cluster bus members
Related tasks
Configure a queue for the default messaging provider