0
votes

<SubscriberSampler guiclass="JMSSubscriberGui" testclass="SubscriberSampler" testname="JMS Subscriber" enabled="true">
          <stringProp name="jms.jndi_properties">false</stringProp>
          <stringProp name="jms.initial_context_factory">org.apache.activemq.jndi.ActiveMQInitialContextFactory</stringProp>
          <stringProp name="jms.provider_url">tcp://127.0.0.1:61610</stringProp>
          <stringProp name="jms.connection_factory">ConnectionFactory</stringProp>
          <stringProp name="jms.topic">dynamicQueue/MyQueue</stringProp>
          <stringProp name="jms.security_principle">admin</stringProp>
          <stringProp name="jms.security_credentials">admin</stringProp>
          <boolProp name="jms.authenticate">true</boolProp>
          <stringProp name="jms.iterations">1</stringProp>
          <stringProp name="jms.read_response">false</stringProp>
          <stringProp name="jms.client_choice">jms_subscriber_on_message</stringProp>
          <stringProp name="jms_error_reconnect_on_codes"></stringProp>
          <stringProp name="jms.selector">type=&apos;Queue&apos;</stringProp>
        </SubscriberSampler>

I need consume active mq message from jmeter I have configured JMS Subscriber but getting errer message

Thread Name: Thread Group 1-1 Sample Start: 2019-09-11 18:52:42 BST Load time: 0 Connect Time: 0 Latency: 0 Size in bytes: 0 Sent bytes:0 Headers size in bytes: 0 Body size in bytes: 0 Sample Count: 1 Error Count: 1 Data type ("text"|"bin"|""): text Response code: 000 Response message: javax.naming.NameNotFoundException: dynamicQueue/MyQueue

2

2 Answers

0
votes

Try with below queue name "dynamicQueues/MyQueue" instead of dynamicQueue/MyQueue

You can refer: https://activemq.apache.org/how-to-unit-test-jms-code

0
votes

NameNotFoundException: dynamicQueue/MyQueue

As per javax.naming.NameNotFoundException JavaDoc

This exception is thrown when a component of the name cannot be resolved because it is not bound.

Double check that the queue and/or topic exists and your user has enough rights to access it. The easiest way of checking is using the ActiveMQ Web Console

Check out Building a JMS Testing Plan - Apache JMeter article for instructions on sending/receiving JMS messages using JMeter