Managing Durable Subscriptions How Sharing a Durable Subscription Works

Developing Advanced PubSub Applications 13-7 is to use administrative measures described in Section 13.2.3.4, Managing Durable Subscriptions.

13.2.3.4 Managing Durable Subscriptions

When there are subscriptions distributed throughout a cluster, it is possible there are some subscriptions that should have been deleted but have not been deleted. Such subscriptions are sometimes called abandoned subscriptions, and can continue to accumulate messages even though theres no subscriber processing the messages. If the accumulating messages never expire, they may eventually cause the topic to begin throwing resource allocation exceptions quota exceptions, or if quotas arent configured, can even cause a server to run out of memory. For example, the unsubscribe call fails when there are active subscribers on the subscription and the unsubscribe call does not reach subscriptions on inactive shutdown members. When this happens, the subscription is left on the member where the call failed until it is manually removed by an administrator or the call is repeated. To help handle these situations, administrators have the following options to monitor and manage durable subscriptions: ■ There is one instance of the JMSDurableSubscriptionRuntimeMBean for each durable subscription. Administrators can monitor on a topic or UDT using the Administration Console or by using WLST command line or scripts. See Monitor JMS servers in Oracle WebLogic Server Administration Console Help. ■ To find an abandoned or orphaned durable subscription, administrator can check the LastMessagesReceivedTime on the JMSDurableSubscriberRuntimeMBean. The getLastMessagesReceivedTime method returns the last time a message was received by a subscriber from the subscription. Based on this information, together with attributes like the MessagesPendingCount or BytesPendingCount on the same MBean, an administrator can build a clear picture of the status of a particular durable subscription and take appropriate action, such as cleanup the resources.

13.2.3.4.1 Naming Conventions for the JMSDurableSubscriberRuntimeMbean If a durable

subscription is created using the subscription key, MyClientID, MySubscriptionName, the name of the associated JMSDurableSubscriberRuntimeMBean is either: ■ MyClientID _MySubscriptionName when the Client ID Policy is RESTRICTED. Where MyClientID is the Client ID for this subscription and MySubscriptionName is the name of the subscription. ■ MyClientID _MySubscriptionNametopicNameJMSServerName when the Client ID Policy is UNRESTRICTED. Where MyClientID is the Client ID for this subscription, MySubscriptionName is the name of the subscription., topicName is the name of a standalone topic or a member of a UDT, and JMSServerName is the name of the JMSServer that the topic or member is deployed on.

13.3 Design Strategies when using Topics

The following sections provide information on Topic-based design strategies that can be used to develop high availability applications: ■ Section 13.3.1, One-copy-per-instance Design Strategy