MessageProducer.send() is too slow for a particular topic

守給你的承諾、 提交于 2019-12-13 05:31:16

问题


I've narrowed down the area of the problem I'm facing and it turned out that MessageProducer.send() is too slow when it is created for a particular topic "replyfeserver":

auto producer = context.CreateProducerFromTopic("replyfeserver");

producer->send(textMessage); //it is slow

Here the call to send() blocks for up to 55-65 seconds occasionally — almost every after 4-5 calls, and up to 5-15 seconds in general.

However, if I use some other topic, say "feserver.action.status".

auto producer = context.CreateProducerFromTopic("feserver.action.status");

producer->send(textMessage); //it is fast!

Now the call to send() returns immediately, within a fraction of second. I've tried send() with several other topics and all of them work fast enough.

What could be the possible issues with this particular topic "replyfeserver"? What are the things I should look at in order to diagnose the issue with it? I was using this topic for last 2 months.

I'm using XMS C++ API and please assume that context object is an abstraction which creates session, destination, consumer, producer and so on.

I'd also like to know if there is any difference between these two approaches:

xms::Destination dest("topic://replyfeserver");

vs

xms::Destination dest = session.createTopic("replyfeserver");

I tried with both, it doesn't make any difference — at least I didn't notice it.


回答1:


There shouldn't be any difference. Personally, I like to have my topics in a hierarchy. i.e. A.B.C

I would run an MQ trace then open a PMR with IBM and give them the trace and say please explain the delay.



来源:https://stackoverflow.com/questions/35223841/messageproducer-send-is-too-slow-for-a-particular-topic

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!