JMeter中JMS点对点请求超时不会报错

Timeout of JMS Point-to-point requests in JMeter does not result in an error

我们使用 Apache JMeter 2.12 来测量 JMS 队列的响应时间。但是,我们想看看其中有多少请求花费的时间少于特定时间。根据 JMeter 的官方网站 (http://jmeter.apache.org/usermanual/component_reference.html),这应该由超时设置 属性。您可以在下面的照片中看到我们的配置:

但是,设置超时不会导致发送100个请求后出错。我们可以看到其中一些花费的时间明显超过该时间:

我还缺少其他一些设置还是有办法实现我的目标?

谢谢!

JMS Point-to-Point 的 JMeter 文档将超时描述为

The timeout in milliseconds for the reply-messages. If a reply has not been received within the specified time, the specific testcase failes and the specific reply message received after the timeout is discarded. Default value is 2000 ms.

这不是实际发送消息的时间,而是接收响应的时间。

JMeter 点对点的 source 将确定您是否配置了 'Receive Queue'。如果这样做,它将通过执行程序路径并使用超时值,否则它不会使用时间超时值。

            if (useTemporyQueue()) {
                executor = new TemporaryQueueExecutor(session, sendQueue);
            } else {
                producer = session.createSender(sendQueue);
                executor = new FixedQueueExecutor(producer, getTimeoutAsInt(), isUseReqMsgIdAsCorrelId());
            }

在您的屏幕截图中,未定义 JNDI 名称 Receive Queue,因此它使用临时队列,并且不使用超时。在这种情况下是否应该支持超时,最好在 JMeter 论坛中讨论。

或者,如果您想在 percentiles/buckets 中查看请求时间,请阅读此堆栈溢出 Q/A -