I want to configure IIB 10 and MQ 8 so that the published monitoring-event messages are persisted in a persistent MQ queue.
The manual at : https://www.ibm.com/support/knowledgecenter/SSMKHH_10.0.0/com.ibm.etools.mft.doc/ac37850_.htm has a Note to say:
Publications resolve to be nonpersistent by default, but you can change a publication to be persistent by configuring named topics in WebSphere® MQ. For more information, see the Subscriptions and message persistence topic in the WebSphere MQ Version 7.5 product documentation online.
Unfortunately, this weird ref to an old version of MQ leads nowhere.
I went through the MQ manual that defines the fields in the Topic definition in Explorer and that doesn't help, since the 'Default persistence' requires the publisher to use MQPER_PERSISTENCE_AS_Q_DE
F. As IIB's default is 'not persistent', I have to assume it doesn't use this.
I'd be really grateful if someone could tell me how to override this and have persisitent messages written to a persistent queue.
FWIW
I originally assumed that defining the queue to receive the event messages as persistent would do the trick - it doesn't.
Next, I tried defining a topic XXX
with topic string $SYS/Broker/int-sver/monitoring/+/+
with 'Default persistence' set to 'Persistent' - that doesn't work, either.
You mentioned the docs state "Publications resolve to be nonpersistent by default", this does not mean that they use MQPER_NOT_PERSISTENT
, likely they use MQPER_PERSISTENCE_AS_Q_DEF
or specify nothing at all in which case it defaults to the same as if MQPER_PERSISTENCE_AS_Q_DEF
was specified.
The problem is with your topic string. A TOPIC object is a anchor to a leaf in the tree. It applies to anything below that leaf unless a more specific TOPIC object applies. So in your case the string should be $SYS/Broker/int-sver/monitoring
with out the /+/+
at the end.
+
is a wildcard and wildcards only come into play on subscriptions not on topics.
You can find more information in the IBM MQ v8.0 Knowledge Center page IBM MQ>Technical overview>IBM MQ objects>Object types>Topic objects:
A topic object is an IBM® MQ object that allows you to assign specific, non-default attributes to topics.
A topic is defined by an application publishing or subscribing to a particular topic string. A topic string can specify a hierarchy of topics by separating them with a forward slash character (/). This can be visualized by a topic tree. For example, if an application publishes to the topic strings /Sport/American Football and /Sport/Soccer, a topic tree will be created that has a parent node Sport with two children, American Football, and Soccer.
Topics inherit their attributes from the first parent administrative node found in their topic tree. If there are no administrative topic nodes in a particular topic tree, then all topics will inherit their attributes from the base topic object, SYSTEM.BASE.TOPIC.
You can create a topic object at any node in a topic tree by specifying that node's topic string in the TOPICSTR attribute of the topic object. You can also define other attributes for the administrative topic node. For more information about these attributes, see the The MQSC commands, or the Automating administration tasks. Each topic object will, by default, inherit its attributes from its closest parent administrative topic node.
topic objects can also be used to hide the full topic tree from application developers. If a topic object named FOOTBALL.US is created for the topic /Sport/American Football, an application can publish or subscribe to the object named FOOTBALL.US instead of the string /Sport/American Football with the same result.
If you enter a #, +, /, or * character within a topic string on a topic object, the character is treated as a normal character within the string, and is considered to be part of the topic string associated with a topic object.
For more information about topic objects, see Publish/subscribe messaging.
The closest page I could find to the link in the IIB KC on MQ v8.0 is the IBM MQ Knowledge Center page IBM MQ>Developing applications>Developing MQI applications with IBM MQ>Writing a procedural application for queuing>Writing publish/subscribe applications>Subscription options:
Message persistence --
Queue managers maintain the persistence of the publications they forward to subscribers as set by the publisher. The publisher sets the persistence to be one of the following options:
0
Nonpersistent1
Persistent2
Persistence as queue/topic definitionFor publish/subscribe, the publisher resolves the topic object and topicString to a resolved topic object. If the publisher specifies Persistence as queue/topic definition, then the default persistence from the resolved topic object is set for the publication.