Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jmeter: Use the same ConnectionFactory for Multiple threads while posting JMS messages

Tags:

java

jms

jmeter

I am using the JMS point-to-point sampler of Jmeter to test the performance if a large number of JMS messages are posted on to a Queue.

The Jmeter at present creates a new QueueConnectionFactory and QueueConnection for each of the thread ( as per the number of threads provided) . I guess this is not how it happens via the front end, where a single connection factory handles different threads.

How do we make sure that it creates only one connection for all the threads? Is there any option in Jmeter? Or should we modify the code? It would be nice if someone could guide me in the right direction.

like image 226
Chillax Avatar asked Sep 05 '12 11:09

Chillax


1 Answers

As of version 2.7, JMeter does not have an option to create one QueueConnection and share it accross threads. Only InitialContext is cached.

I opened an enhancement request on JMeter Bugzilla:

  • https://issues.apache.org/bugzilla/show_bug.cgi?id=53833

Regarding what you say about real life, it really depends on what is simulated:

  • If you want to simulate one application using one broker then what you say is true

  • But if you want to simulate many application using one broker, then current JMeter approach is closer to reality.

Regards

Philippe M.

like image 183
UBIK LOAD PACK Avatar answered Oct 06 '22 21:10

UBIK LOAD PACK