bbx402
bbx402

Reputation: 143

jmeter: Can I use jmeter JMeter "JMS Point-To-Point" to send messages to MSFT Azure Service Bus queue?

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]

Upvotes: 2

Views: 2233

Answers (2)

Dop
Dop

Reputation: 61

I could achive sending message to azure service bus by using the "AMQP Publisher-Sampler" or "Java Sampler". The difference to JMS Point-to-point Sampler is that both use "SEND claims" resp. "LISTEN claims", when sending a message, and that is not part of JMS Point to Point standard implementation.

Upvotes: 0

UBIK LOAD PACK
UBIK LOAD PACK

Reputation: 34546

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):

JMS Point-to-Point config

See this for more details:

Upvotes: 1

Related Questions