简体   繁体   English

JMeter JMS 点对点队列测试 - “未收到回复消息”

[英]JMeter JMS Point To Point Queue Testing - "No reply message received"

I have a JMeter JMS Point to Point test in which I am sending an XML document onto a queue which goes into MongoDB and responds the XML document back.我有一个 JMeter JMS 点对点测试,我将一个 XML 文档发送到一个队列,该队列进入 MongoDB 并响应 XML 文档。

When I run the test in JMeter I can see through the RedHat logs that the request has gone into Mongo and returned correctly.当我在 JMeter 中运行测试时,我可以通过 RedHat 日志看到请求已进入 Mongo 并正确返回。 Although within JMeter, the test fails and I get the message:虽然在 JMeter 中,测试失败,但我收到消息:

"No reply message received" “没有收到回复消息”

If I set the ' communication-style ' to ' Request Only ' the test passes.如果我将“ communication-style ”设置为“ Request Only ”,则测试通过。 All my connections are correct and I am using JMeter version 2.11.我所有的连接都是正确的,我使用的是 JMeter 2.11 版。

I have read on forums to change the jmeter.properties file to enable JMSSampler.useSecurity.properties=false .我在论坛上读过更改 jmeter.properties 文件以启用JMSSampler.useSecurity.properties=false This has not worked.这没有奏效。

Any thoughts on this would be much appreciated,对此的任何想法将不胜感激,

Thanks,谢谢,

Kash卡什

Fixed.固定的。

I removed the property for ' queue.Response ' as well as the JNDI name Receive Queue field.我删除了“ queue.Response ”的属性以及 JNDI 名称“接收队列”字段。

That seemed to do the trick这似乎奏效了

I had the same issue and this is how it was addressed:我遇到了同样的问题,这是如何解决的:

It appears if you are using different queues for request and response, neither of the pre defined attributes to use either messageID or CorrelationID to track response messages does not work.如果您对请求和响应使用不同的队列,那么使用 messageID 或 CorrelationID 来跟踪响应消息的预定义属性都不起作用。

Therefore don't select any of the two - deselect both.因此不要选择两者中的任何一个 - 取消选择两者。 Instead, define a new attribute any the JMS properties for correlation ID as follows相反,为相关 ID 定义任何 JMS 属性的新属性,如下所示

Property name: JMSCorrelationId Property value: MesgID-${_time(,)}属性名称:JMSCorrelationId 属性值:MesgID-${_time(,)}

This should work fine.这应该可以正常工作。

This issue can be fixed by providing JMSCorrelationId property Provide the property value as MsgId-${__time()} Note the double underscore as suffix of time function ( https://jmeter.apache.org/usermanual/functions.html#__time ) This will ensure that a correlation Id of current millis is sent on every request and will be matched from response on return.这个问题可以通过提供 JMSCorrelationId 属性来解决 提供属性值作为 MsgId-${__time()} 注意双下划线作为时间函数的后缀 ( https://jmeter.apache.org/usermanual/functions.html#__time )这将确保在每个请求上发送当前毫秒的相关 ID,并将在返回时与响应匹配。

Note: 1. use communication style as Request Response 2. do not check any alternate fields checkboxes 3. Provide JNDI name receive queue on which responses are sent注意:1. 使用通信风格作为请求响应 2. 不要选中任何备用字段复选框 3. 提供发送响应的 JNDI 名称接收队列

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM