IBM MQ activity 日志问题

IBM MQ activity log issue

我们正在使用 IBM MQ8.0。正在记录我们发送到外部系统的传出消息的活动日志。但是对于从外部系统到我们的 MQ 管理器的消息,没有可用的日志。 客户端通道配置有问题吗? 或者 MQ 日志记录配置问题?

IBM 在知识中心页面“Making sure that messages are not lost (logging)

中将这些 "activity logs" 描述为恢复日志

IBM MQ records all significant changes to the persistent data controlled by the queue manager in a recovery log.

This includes creating and deleting objects, persistent message updates, transaction states, changes to object attributes, and channel activities. The log contains the information you need to recover all updates to message queues by:

  • Keeping records of queue manager changes
  • Keeping records of queue updates for use by the restart process
  • Enabling you to restore data after a hardware or software failure

请注意,non-persistent 消息不会记录到恢复日志中。

根据您的问题,您发送到外部系统的消息很可能是 持久性 消息,而您从外部系统接收的消息是 non-persistent 条消息,这可以解释为什么它们没有记录到恢复日志文件中。

持久性是在第一次 PUT 消息时确定的。

IBM 有一篇关于这个主题的很好的技术说明“Message persistence FAQs”。

Q3. What is the best way to be certain that messages are persistent?

A3. Set MQMD message persistence to persistent (MQPER_PERSISTENT), or nonpersistent (MQPER_NOT_PERSISTENT) and your message will always retain that value.

Note: MQPER_PERSISTENCE_AS_Q_DEF is the default setting for the persistence value in the MQMD. See the persistence values listed below.

...

Additional information

MQPER_PERSISTENCE_AS_Q_DEF can lead to unexpected results. If there is more than one definition in the queue-name resolution path, the default persistence attribute is taken from first queue definition in the path at the time of the MQPUT or MQPUT1 call. This queue could be an:

  • alias queue
  • local queue
  • local definition of a remote queue
  • queue-manager alias
  • transmission queue
  • cluster queue

外部系统需要确保将它们发送给您的消息设置为持久消息,如果您希望它们被记录下来的话。