本文介绍了jmeter:我可以使用jmeter JMeter和"JMS点对点"吗?将消息发送到MSFT Azure服务总线队列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有xml消息,想将它们发送到MSFT ASB队列.

使用JMeter JMS点对点可以做到吗?

如果是,如何?无法弄清楚如何配置.我所拥有的只是ASB的连接字符串.

谢谢.


反馈1:

  INFO o.a.q.j.s.SaslMechanismFinder:与SASL身份验证最匹配的是:SASL-ANONYMOUS2018-10-02 18:46:19,734 INFO o.a.q.j.JmsConnection:连接ID :: 8356a2a7-4cf2-4ab0-8ee9-240b62f5fd73:1已连接到远程Broker:amqps://< HOSTNAME> .servicebus.windows.net2018-10-02 18:46:20,321警告oaqjpabAmqpResourceBuilder:资源打开:(JmsProducerInfo {ID :: 8356a2a7-4cf2-4ab0-8ee9-240b62f5fd73:1:1:1,目标=< QUEUENAME>})失败:越权存取.执行此操作需要发送"声明.资源:"sb://< HOSTNAME> .servicebus.windows.net/< QUEUENAME>".TrackingId:79fda5972c644c8d8f1c33bea40987ae_G52,SystemTracker:gateway7,时间戳:10/2/2018 3:46:17 PM [条件= amqp:未经授权的访问]2018-10-02 18:46:20,321错误o.a.j.p.j.s.JMSSampler:未经授权的访问.执行此操作需要发送"声明.资源:"sb://< HOSTNAME> .servicebus.windows.net/< QUEUENAME>".TrackingId:79fda5972c644c8d8f1c33bea40987ae_G52,SystemTracker:gateway7,时间戳:10/2/2018 3:46:17 PM [条件= amqp:未经授权的访问]javax.jms.JMSSecurityException:未经授权的访问.执行此操作需要发送"声明.资源:"sb://< HOSTNAME> .servicebus.windows.net/< QUEUENAME>".TrackingId:79fda5972c644c8d8f1c33bea40987ae_G52,SystemTracker:gateway7,时间戳:10/2/2018 3:46:17 PM [条件= amqp:未经授权的访问] 
解决方案

是的,应该可以通过

有关更多详细信息,请参见:

I have xml messages and want to send them to an MSFT ASB queue.

Is it doable with JMeter JMS Point-To-Point?

If yes How?Cannot figure out how to configure.All I have is a connection String to the ASB.

Thanks in advance.


Feedback 1:

INFO o.a.q.j.s.SaslMechanismFinder: Best match for SASL auth was: SASL-ANONYMOUS
2018-10-02 18:46:19,734 INFO o.a.q.j.JmsConnection: Connection ID::8356a2a7-4cf2-4ab0-8ee9-240b62f5fd73:1 connected to remote Broker: amqps://<HOSTNAME>.servicebus.windows.net
2018-10-02 18:46:20,321 WARN o.a.q.j.p.a.b.AmqpResourceBuilder: Open of resource:(JmsProducerInfo { ID::8356a2a7-4cf2-4ab0-8ee9-240b62f5fd73:1:1:1, destination = <QUEUENAME> }) failed: Unauthorized access. 'Send' claim(s) are required to perform this operation. Resource: 'sb://<HOSTNAME>.servicebus.windows.net/<QUEUENAME>'. TrackingId:79fda5972c644c8d8f1c33bea40987ae_G52, SystemTracker:gateway7, Timestamp:10/2/2018 3:46:17 PM [condition = amqp:unauthorized-access]
2018-10-02 18:46:20,321 ERROR o.a.j.p.j.s.JMSSampler: Unauthorized access. 'Send' claim(s) are required to perform this operation. Resource: 'sb://<HOSTNAME>.servicebus.windows.net/<QUEUENAME>'. TrackingId:79fda5972c644c8d8f1c33bea40987ae_G52, SystemTracker:gateway7, Timestamp:10/2/2018 3:46:17 PM [condition = amqp:unauthorized-access]
javax.jms.JMSSecurityException: Unauthorized access. 'Send' claim(s) are required to perform this operation. Resource: 'sb://<HOSTNAME>.servicebus.windows.net/<QUEUENAME>'. TrackingId:79fda5972c644c8d8f1c33bea40987ae_G52, SystemTracker:gateway7, Timestamp:10/2/2018 3:46:17 PM [condition = amqp:unauthorized-access]
解决方案

Yes it should be possible through AMQP JMS Client library

Steps:

  • Add those 2 jars to jmeter/lib folder

    • geronimo-jms_1.1_spec-1.0.jar
    • qpid-jms-client-[version].jar
  • Create a properties file called servicebus.properties:

    # servicebus.properties - sample JNDI configuration
    
    # Register a ConnectionFactory in JNDI using the form:
    # connectionfactory.[jndi_name] = [ConnectionURL]
    connectionfactory.SBCF = amqps://[SASPolicyName]:[SASPolicyKey]@[namespace].servicebus.windows.net
    
    # Register some queues in JNDI using the form
    # queue.[jndi_name] = [physical_name]
    # topic.[jndi_name] = [physical_name]
    queue.QUEUE = queue1
    

Configure JMS Point-to-Point this way (change host):

See this for more details:

这篇关于jmeter:我可以使用jmeter JMeter和"JMS点对点"吗?将消息发送到MSFT Azure服务总线队列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 06:44