JMeter JMS Publisher usage with RabbitMQ

825 views
Skip to first unread message

Peter Butkovic

unread,
Apr 4, 2018, 6:11:13 PM4/4/18
to rabbitmq-users

As suggested in the github issue https://github.com/rabbitmq/rabbitmq-jms-client/issues/46 reposting here


I'm trying to do some perf testing with JMeter JMS.
On the server I have rabbitmq_jms_topic_exchange plugin enabled.

What is the proper JMeter Initial Context Factory to be set?
Tried with following:
image
However ended up in (expected) exception:
javax.naming.NamingException: javax.naming.NoInitialContextException: Cannot instantiate class: com.rabbitmq.jms.admin.RMQConnectionFactory [Root exception is java.lang.ClassCastException: com.rabbitmq.jms.admin.RMQConnectionFactory cannot be cast to javax.naming.spi.InitialContextFactory]
        at org
.apache.jmeter.protocol.jms.client.InitialContextFactory.lookupContext(InitialContextFactory.java:69) ~[ApacheJMeter_jms.jar:4.0 r1823414]
        at org
.apache.jmeter.protocol.jms.client.InitialContextFactory.getContext(InitialContextFactory.java:156) ~[ApacheJMeter_jms.jar:4.0 r1823414]
        at org
.apache.jmeter.protocol.jms.client.ReceiveSubscriber.<init>(ReceiveSubscriber.java:231) ~[ApacheJMeter_jms.jar:4.0 r1823414]
        at org
.apache.jmeter.protocol.jms.client.ReceiveSubscriber.<init>(ReceiveSubscriber.java:170) ~[ApacheJMeter_jms.jar:4.0 r1823414]
        at org
.apache.jmeter.protocol.jms.sampler.SubscriberSampler.initListenerClient(SubscriberSampler.java:119) ~[ApacheJMeter_jms.jar:4.0 r1823414]
        at org
.apache.jmeter.protocol.jms.sampler.SubscriberSampler.initClient(SubscriberSampler.java:346) [ApacheJMeter_jms.jar:4.0 r1823414]
        at org
.apache.jmeter.protocol.jms.sampler.SubscriberSampler.threadStarted(SubscriberSampler.java:336) [ApacheJMeter_jms.jar:4.0 r1823414]
        at org
.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:676) [ApacheJMeter_core.jar:4.0 r1823414]
        at org
.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:994) [jorphan.jar:4.0 r1823414]
        at org
.apache.jorphan.collections.HashTree.traverse(HashTree.java:977) [jorphan.jar:4.0 r1823414]
        at org
.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:644) [ApacheJMeter_core.jar:4.0 r1823414]
        at org
.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:632) [ApacheJMeter_core.jar:4.0 r1823414]
        at org
.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:246) [ApacheJMeter_core.jar:4.0 r1823414]
        at java
.lang.Thread.run(Thread.java:745) [?:1.8.0_121]

I don't see any InitialContextFactory implementation in the sources of the rabbitmq-jms-client anywhere. What would be the proper way to use it with JMeter JMS? Or is jmeter JMS sampler not usable at all here?

Michael Klishin

unread,
Apr 4, 2018, 6:16:10 PM4/4/18
to rabbitm...@googlegroups.com
RMQConnectionFactory is an implementation of javax.jms.ConnectionFactory.

[1][2] are highly relevant if not the same question. How this can be done in the context of JMeter is probably out of scope
for this list.


--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ
Reply all
Reply to author
Forward
0 new messages