22 Topic Management

The jconsole Cache MBean screenshots provided in this section show how to monitor storage being used by the unconsumed values on a topic. The storage for topic values are maintained in cache and are observable in JMX under Cache MBeans. Note that for the purpose of this example, there is only one Coherence cache data server and all data is stored in one node. Given a topic named pof-limited, the Cache MBean object name below illustrates that a topic is monitored as a Cache MBean with a name of starting with prefix $topic$ and appended with the topic name. So the name below is $topic$pof-limited for the topic pof-limited.

The following are jconsole Cache MBean screenshots that show how to monitor storage being used by the unconsumed values on a topic. The storage for topic values are maintained in cache and are observable in JMX under Cache MBeans. Note that for the purpose of this example, there is only one Coherence cache data server and all data is stored in one node. Given a topic named pof-limited, the Cache MBean object name below illustrates that a topic is monitored as a Cache MBean with a name of starting with prefix $topic$ and appended with the topic name. So the name below is $topic$pof-limited for the topic pof-limited.

Each Publisher.send of a value to a topic that completes is counted by Cache attribute TotalPuts and every Subscriber.receive of a value that completes is recorded as a Cache attribute TotalGets. The size of the unconsumed values on a topic is the Cache attribute Units. For example 5-2, the topic upper boundary was configured to 10KB and the Units is 10920 bytes. Independent of the number of subscribers, each value published to the topic only takes up space for one copy. In the default configuration mode, when all subscriber groups and subscribers have consumed a value from the topic, the storage used by that value is released and Units attribute decreases.

Figure 22-2 Topic pof-limited is full

Description of Figure 22-2 follows
Description of "Figure 22-2 Topic pof-limited is full "

In Figure 22-3, it is observable that 65 Subscriber.receive have occurred by the Cache Attribute TotalGets being 65 and that there is no outstanding storage being used for topic pof-limited since the Cache Attribute Units is 0. Note, if there had been multiple subscribers and/or subscriber groups for topic pof-limited, there would have been one get recorded for each Subscriber.receive. The TotalPuts will typically not match the TotalGets unless there is only one subscriber group or one subscriber to a topic.

Figure 22-3 Topic pof-limited is empty and has no outstanding values to be consumed

Description of Figure 22-3 follows
Description of "Figure 22-3 Topic pof-limited is empty and has no outstanding values to be consumed"

Persisting Topics on Demand

On-Demand creation of snapshots for Topic Service can be achieved by following instructions in Using Snapshots to Persist a Cache Service. Management of snapshots is discussed in Archiving Snapshots.

Note:

A Topic snapshot only preserves the outstanding unconsumed values on a topic for completed operations. Outstanding asynchronous Publisher.send and Subscriber.receive operations at the time of suspending the topic service are not reflected in a topic snapshot.