Configure the base subscriber queue
Subscriber queues cannot be configured for a direct connection to a broker.
There are two ways in which we can configure subscribers:
- Multiple queue approach
Each subscriber has an exclusive queue assigned to it, from which it retrieves all its messages. JMS creates a new queue for each subscriber. This is the only approach available with WebSphere MQ JMS V1.1.
- Shared queue approach
A subscriber uses a shared queue, from which it, and other subscribers, retrieve their messages. This approach requires only one queue to serve multiple subscribers. This is the default approach used with WebSphere MQ JMS.
We can choose which approach to use, and configure which queues to use.
In general, the shared queue approach gives a modest performance advantage. For systems with a high throughput, there are also large architectural and administrative advantages, because of the significant reduction in the number of queues required.
In some situations, there are still good reasons for using the multiple queue approach:
- The theoretical physical capacity for message storage is greater.
There is an upper limit to the number of messages that a WebSphere MQ queue can hold and so, in the shared queue approach, the total number of messages for all the subscribers that share the queue cannot exceed this limit. This issue is more significant for durable subscribers, because the lifetime of a durable subscriber is usually much longer than that of a non-durable subscriber. Therefore, more messages might accumulate for a durable subscriber.
- External administration of subscription queues is easier.
For certain application types, administrators might want to monitor the state and depth of particular subscriber queues. This task is much simpler when there is one to one mapping between a subscriber and a queue.
uj24830_