简体   繁体   English

通过 jmeter 在安慰队列中发布字节消息

[英]Posting byte message in solace queue through jmeter

Need to post a byte message to solace queue using Jmeter.需要使用 Jmeter 将字节消息发布到安慰队列。 I have tried in following manner might be am incorrect but tried with following:我尝试过以下方式可能不正确,但尝试过以下方式:

  1. Use JMSPublisher sampler使用 JMSPublisher 采样器
  2. create jndi.properties file and put in jmeter/lib创建 jndi.properties 文件并放入 jmeter/lib

jndi.properties jndi.properties

java.naming.factory.initial = com.solacesystems.jndi.SolJNDIInitialContextFactory
java.naming.provider.url = smf://<remote IP and port>
java.naming.security.principal=<username>
java.naming.security.credentials=<password>
 Solace_JMS_VPN=<VPN Name>

in JMSPublisher sampler (in GUI)在 JMSPublisher 采样器中(在 GUI 中)

Connection Factory = connectionFactory连接工厂 = 连接工厂

Destination = (Queue Name )目的地 =(队列名称)

Message Type (radio button---Byte message)消息类型(单选按钮---字节消息)

Content encoding -- RAW内容编码——RAW

in text area ---> (Byte message)在文本区域--->(字节消息)

Note: I have used actual values of IP/port/username/port/queuename/bytemessage, cannot share those.注意:我使用了 IP/port/username/port/queuename/bytemessage 的实际值,不能共享。 Soljms jar is available in lib folder too. Soljms jar 在 lib 文件夹中也可用。

getting error:收到错误:

Response message: javax.naming.NamingException: JNDI lookup failed - 503: Service Unavailable [Root exception is (null) com.solacesystems.jcsmp.JCSMPErrorResponseException: 503: Service Unavailable]响应消息:javax.naming.NamingException:JNDI 查找失败 - 503:服务不可用 [根异常为 (null) com.solacesystems.jcsmp.JCSMPErrorResponseException:503:服务不可用]

Though it is working perfectly fine when did with java spring boot.尽管使用 java spring 启动时它工作得非常好。 There used properties files in place of JNDI.使用属性文件代替了 JNDI。

It would be great if anyone can guide me, please do not give activeMQ JNDI am actively looking for posting on solace queue or create connection to solace appliances through Jmeter.如果有人可以指导我,那就太好了,请不要让 activeMQ JNDI 正在积极寻找在慰藉队列上发帖或通过 Jmeter 创建与慰藉设备的连接。

I don't think you should be putting your Byte message into the textarea as it accepts either plain text or an XStream object, consider providing your payload via binary file(s) instead我认为您不应该将Byte message放入文本区域,因为它接受纯文本或XStream object,请考虑通过二进制文件提供有效负载

If you're capable of sending the message using Java code you should be able to replicate the same using:如果您能够使用 Java 代码发送消息,您应该能够使用以下方法复制相同的消息:

  1. JMeter'sJSR223 Sampler with Groovy language (Java syntax will work) JMeter 的JSR223 采样器与 Groovy 语言(Java 语法将工作)
  2. Or JUnit Request sampler if you need "strict" javaJUnit 如果您需要“严格”,请索取采样器 java

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

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