如何配置 IIB 10 以将 monitoring_event 消息作为持久消息发布到持久 MQ 队列?

How to configure IIB 10 to publish monitoring_event messages as persisitent to persistent MQ queue?

我想配置 IIB 10 和 MQ 8,以便将发布的监控事件消息持久保存在持久性 MQ 队列中。

手册位于:https://www.ibm.com/support/knowledgecenter/SSMKHH_10.0.0/com.ibm.etools.mft.doc/ac37850_.htm 有一个注释要说:

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.

不幸的是,这个对旧版本 MQ 的奇怪引用毫无意义。

我浏览了 MQ 手册,该手册在 Explorer 的主题定义中定义了字段,但没有帮助,因为 'Default persistence' 要求发布者使用 MQPER_PERSISTENCE_AS_Q_DEF。由于 IIB 的默认值是 'not persistent',我不得不假设它不使用这个。

如果有人能告诉我如何覆盖它并将持久消息写入持久队列,我将不胜感激。

FWIW 我最初假设将队列定义为持久接收事件消息就可以解决问题 - 但事实并非如此。 接下来,我尝试使用主题字符串 $SYS/Broker/int-sver/monitoring/+/+ 定义主题 XXX 并将 'Default persistence' 设置为 'Persistent' - 这也不起作用。

您提到了文档状态“默认情况下发布解析为非持久性”,这并不意味着他们使用 MQPER_NOT_PERSISTENT,可能他们使用 MQPER_PERSISTENCE_AS_Q_DEF 或在这种情况下什么都不指定默认值与指定 MQPER_PERSISTENCE_AS_Q_DEF 相同。

问题出在您的主题字符串上。 TOPIC 对象是树中叶子的锚点。它适用于该叶下的任何内容,除非适用更具体的 TOPIC 对象。所以在你的情况下,字符串应该是 $SYS/Broker/int-sver/monitoring,最后没有 /+/+

+ 是一个通配符,通配​​符只对订阅有效,对主题无效。


您可以在 IBM MQ v8.0 知识中心页面找到更多信息 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.


我在 MQ v8.0 上的 IIB KC 中找到的最接近 link 的页面是 IBM MQ 知识中心页面 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
Nonpersistent

1
Persistent

2
Persistence as queue/topic definition

For 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.

本文介绍了如何生成和订阅代理生成的事件消息。 它不在文本中,但我认为生成的消息是持久的。

https://www.ibm.com/developerworks/websphere/library/techarticles/0911_fan/0911_fan.html

在订阅队列中也可以设置 DEFPSIST(YES)