[英]JMeter JMS subscriber how to read a BytesMessage from the topic
In my Jmeter scenario have to receive a BytesMessage from a JMS tpoic in ActiveMQ and alter it a bit and push back to another topic ans a BytesMessage. 在我的Jmeter场景中,必须从ActiveMQ中的JMS tpoic接收BytesMessage并对其进行一些更改,然后再推回另一个主题,然后再返回BytesMessage。
I was using JMS subscriber and Publisher for this. 我为此使用了JMS订阅服务器和发布服务器。
Using JMS Subscriber I was able to receve the message from the topic, but could not find a way to read it so that I can work on it to alter. 使用JMS订阅服务器,我可以从主题中接收消息,但是找不到读取消息的方法,因此可以对其进行更改。
My sampler looks like follows. 我的采样器如下所示。
When I run this I can receive the message from the topic. 当我运行此程序时,我会收到来自该主题的消息。
This says that there is a ByteMessage of 212 bytes, how can I capture this message , and use it to build my next request ? 这表示有一个212字节的ByteMessage,如何捕获此消息,并使用它构建下一个请求?
If you want to capture full response of the sampler into a JMeter Variable go for the next steps: 如果要将采样器的完整响应捕获到JMeter变量中,请继续以下步骤:
Configure it as follows: 如下配置:
response
response
(?s)(^.*)
(?s)(^.*)
Template: $1$
模板:
$1$
Explanation: 说明:
()
= grouping()
=分组
(?s)
= single line modifier(?s)
=单行修饰符
^
= line start^
=行首
.
= wild-card character=通配符
*
= repetition*
=重复
That's it, now you will have the whole response saved into a JMeter Variable , you will be able to refer it as ${response}
or ${__V(response)}
where required 就是这样,现在您将整个响应保存到JMeter变量中 ,可以在需要时将其引用为
${response}
或${__V(response)}
More information: 更多信息:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.