MQ 消息延迟数天

发布于 2024-10-28 08:13:07 字数 371 浏览 5 评论 0原文

我们使用 IBM WebSphere MQ 来处理 SWIFT 消息。收到 SWIFT 消息后,系统会对其进行处理并随着处理的进行将其放入本地队列中。如下:

外面的世界> Q1>应用程序> Q2>应用程序> Q3>应用程序

队列是本地队列。但是,当消息从第一季度/第二季度/第三季度到达应用程序时,出现了相当大的延迟……比如几天。而这种情况的发生是任意的。我们不知道为什么会发生这种情况。大多数消息都很快就能收到,但也有一些消息会在 3-4 天内到达,但会延迟到达。

所有这一切都发生在一个事务中,我们使用 Atomikos 作为我们的事务管理器。

以前有人遇到过类似的问题吗?任何帮助表示赞赏。

谢谢, 米敦。

We use IBM WebSphere MQ for SWIFT messages. When a SWIFT message is received, it is processed and put into Local Queues as the processing goes on. Its like the follows :

Outside World > Q1 > App > Q2 > App > Q3 > App

The queues are local queues. But there has been considerable delay when the message reaches the Application from Q1/Q2/Q3 ... like days. And this happens arbitrarily. We have no clue as to why this is happening. Most of the messages get thru pretty quick but there are a couple of them in 3-4 days which arrive late.

All this happens in a transaction and we use Atomikos as our Transaction Manager.

Has anybody faced a similar issue before ? Any help is appreciated.

Thanks,
Midhun.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蒲公英的约定 2024-11-04 08:13:07

有多种方法可以延迟 WebSphere MQ 消息,并且诊断可能需要一些侦探工作。以下是一些更常见的原因:

  1. 消息卡在同步点下。虽然一条消息在同步点下呆上几天的情况很不寻常,但我已经看到这种情况发生了。问题在于,某些应用程序设计为在单个事务中批量处理多个消息,并且当消息未批量到达时,其余消息会等待另一条消息到达并关闭批处理。
  2. 消息卡在同步点下。在另一种情况下,程序逻辑在读取下一条消息之前不会提交同步点。当多个线程处理消息时,所有线程之间的负载分布不一定是均匀的,如果负载较轻,一个线程可能会缺乏消息。
  3. 消息因浏览而孤立。在这种情况下,消息到达的优先级高于当前浏览光标。如果重新扫描间隔设置得非常高且流量也很高,则可能需要一段时间才能将浏览光标重置到队列顶部。
  4. 程序错误。您没有提到您正在使用哪个版本的 WMQ 客户端和服务器(希望都是 7.0!),但偶尔会出现导致线程挂起的问题。这些可以将消息绑定在同步点下。访问 最新 FixPack 始终是一个好主意您的版本并检查名为“问题已修复...”的链接,看看 APAR 是否解决了您的特定问题。如果是这样,请应用最新的修复包。

要开始诊断此问题,请使用 DIS QSTATUS 命令显示队列上的输入和输出句柄数、消息期限以及任何未完成的工作单元。您还可以使用 SupportPac MA0W 中的退出来获取给定队列上所有 API 调用的人类可读跟踪。这可能是一个非常有价值的诊断工具,因为您可以准确地知道消息在同步点下停留了多长时间,是否连续回退并重新读取,API 调用使用哪些选项等。您甚至可以限制跟踪到特定的队列或特定的线程,如果您需要让它运行一段时间,这会很有帮助。

There are a number of ways in which WebSphere MQ messages can be delayed and diagnosing may take a little detective work. Here are a few of the more common causes:

  1. Message stuck under syncpoint. Although it would be unusual for a message to sit under syncpoint for days, I've seen it happen. The issue is that some applications are designed to batch up several messages in a single transaction and when messages do not arrive in a batch multiple, the remainder of the messages sit and wait for another message(s) to arrive and close the batch.
  2. Message stuck under syncpoint. In another case, the program logic does not commit a syncpoint until the next message is read. When several threads are processing messages, distribution of load is not necessarily uniform across all threads and one can be starved for messages if the load is light.
  3. Message orphaned by browse. In this scenario, a message arrives at a higher priority than the current browse cursor. If the rescan interval is set extremely high and traffic volume also high, it may take a while before the browse cursor is reset to the top of the queue.
  4. Program error. You didn't mention which version of WMQ client and server you are using (hopefully both at 7.0!) but occasionally there are issues that cause threads to hang. These can tie up a message under syncpoint. It is always a good idea to go to the latest FixPack for your version and check the link called "Problems fixed in..." to see if an APAR addresses your specific issue. If so, apply the latest Fix Pack.

To start diagnosing this, use the DIS QSTATUS command to display the number of input and output handles on the queue, the message age and any outstanding units of work. You can also use the exit in SupportPac MA0W to get a human-readable trace of all API calls on a given queue. This can be an extremely valuable diagnostic tool because you can tell exactly how long a message sat under syncpoint, whether it is being continuously backed out and re-read, what options are used for the API call, etc. You can even limit the trace to specific queues or specific threads which is helpful if you need to let it run for a while.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文