Search code examples
jmeterjmsperformance-testing

How to do JMS performance testing with JMeter?


I'm using @JmsListener annotation to fetch logs from Azure service bus queue and later saving it into Elasticsearch.

I need to conduct performance testing using JMeter. There's no http endpoint. I'm just using @JmsListener annotation as soon as application starts it auto fetch all data from bus. Can someone guide on this?

I get to know there's a JMS subscriber and JMS point-to-point sampler option in JMeter, but what all parameters do I need to set? There's one initial context factory parameter. I provided it as org.apache.qpid.jms.jndi.InitialContextFactory, and it's giving below error.

Response message:javax.naming.NamingException: javax.naming.NoInitialContextException: Cannot instantiate class: org.apache.qpid.jms.jndi.JmsInitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.apache.qpid.jms.jndi.JmsInitialContextFactory]

I'm using below dependency in my code.

<dependency>
   <groupId>com.azure.spring</groupId>
   <artifactId>spring-cloud-azure-starter-servicebus-jms</artifactId>
   <version>5.6.0</version>
</dependency>

Can someone help on this configuration?


Solution

  • To resolve the javax.naming.NoInitialContextException you need to put the jar containing org.apache.qpid.jms.jndi.InitialContextFactory on JMeter's classpath. For example, you can just drop it into the JMETER_HOME/lib directory. See the documentation for more details.