对于特定主题,MessageProducer.send()太慢 [英] MessageProducer.send() is too slow for a particular topic
问题描述
我缩小了所要解决的问题的范围,结果发现为特定主题"replyfeserver"
创建的MessageProducer.send()
太慢了:
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
在这里,对send()
块的调用有时最多持续55-65秒—几乎每4-5次通话之后,一般就最多5-15秒.
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.
但是,如果我使用其他主题,请说"feserver.action.status"
.
However, if I use some other topic, say "feserver.action.status"
.
auto producer = context.CreateProducerFromTopic("feserver.action.status");
producer->send(textMessage); //it is fast!
现在,对send()
的调用会立即在几分之一秒之内返回.我已经尝试了send()
的其他几个主题,它们都足够快地工作.
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.
此特定主题"replyfeserver"
可能有什么问题?为了诊断问题,我应该看什么?最近两个月我一直在使用此主题.
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.
我正在使用XMS C ++ API,请假定context
对象是创建会话,目的地,使用者,生产者等的抽象.
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.
推荐答案
应该没有什么区别.就个人而言,我喜欢将我的主题放在一个层次结构中.即A.B.C
There shouldn't be any difference. Personally, I like to have my topics in a hierarchy. i.e. A.B.C
我将运行MQ跟踪,然后与IBM打开PMR,并给他们跟踪,并说请解释延迟.
I would run an MQ trace then open a PMR with IBM and give them the trace and say please explain the delay.
这篇关于对于特定主题,MessageProducer.send()太慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!