Subscription stores

 

A subscription store is not used if the transport type is direct.

When an application creates a message consumer in the publish/subscribe domain, information about the subscription is created at the same time. WebSphere MQ JMS maintains a persistent store of subscription information called a subscription store. A subscription store is used to reopen durable topic subscribers and to clean up after a nondurable message consumer fails. A subscription store can be managed by the local queue manager or by the publish/subscribe broker.

The SUBSTORE property of a ConnectionFactory object determines the location of a subscription store. SUBSTORE has three possible values:

SUBSTORE(QUEUE)

Subscription information is stored in the queues, SYSTEM.JMS.ADMIN.QUEUE and SYSTEM.JMS.PS.STATUS.QUEUE, on the local queue manager.

WebSphere MQ JMS maintains an extra connection to each queue manager used by subscribers. Each connection is used by a long running transaction that detects when a subscriber loses its connection to the queue manager and cleans up after the subscriber. In a busy system, a long running transaction might cause the queue manager log to fill up resulting in errors from both the queue manager and the applications connected to it.

If you experience these problems, your system administrator can add extra log files or data sets to the queue manager. Alternatively, we can reduce the value of the STATREFRESHINT property of the ConnectionFactory object. This causes the long running transaction to be refreshed more frequently, allowing the queue manager log to reset itself before it becomes full.

After a nondurable message consumer fails, the following occurs:

  • Subscription information related to the failed consumer remains on the two queues implementing the subscription store. This information can be removed by a cleanup utility supplied with WebSphere MQ JMS. See Consumer cleanup utility for the publish/subscribe domain for more information.

  • Messages continue to be delivered to the consumer until the cleanup utility runs.

This option is provided for compatibility with versions of MQSeries JMS.

SUBSTORE(BROKER)

Subscription information is stored by the publish/subscribe broker used by the application, not in WebSphere MQ queues. This means that, if a JMS client fails, the broker can clean up the resources associated with the JMS client without having to wait for the JMS client to reconnect.

If a nondurable message consumer fails, the subscription is de-registered from the broker as soon as possible. In response to the de-registration, the broker puts a report message on the queue, SYSTEM.JMS.REPORT.QUEUE. This message is used to clean up after the failed consumer.

If you use this option, a separate cleanup thread is run in the background. By default, the cleanup utility runs once every 10 minutes, but we can change this interval by setting the CLEANUPINT property of the ConnectionFactory object. To customize the actions performed by the cleanup utility, use the CLEANUP property of the ConnectionFactory object. For more information about how the cleanup utility works, see Consumer cleanup utility for the publish/subscribe domain.

SUBSTORE(MIGRATE)

This is the default value.

This option dynamically selects a queue based or a broker based subscription store depending on the release levels of WebSphere MQ and the publish/subscribe broker that are installed. If both WebSphere MQ and the broker are capable of supporting the SUBSTORE(BROKER) option, this option behaves like the SUBSTORE(BROKER) option; otherwise, it behaves like the SUBSTORE(QUEUE) option.

If this option behaves like the SUBSTORE(BROKER) option, the option additionally migrates durable subscription information from the queue based subscription store to the broker based store. This migration occurs the first time a durable subscription is opened when both WebSphere MQ and the broker are capable of supporting a broker based subscription store. Only information related to the subscription being opened is migrated. Information related to other subscriptions is left in the queue based subscription store. This option therefore provides an easy migration path from older versions of WebSphere MQ JMS, WebSphere MQ, and the publish/subscribe broker.


uj25180_