java.io.IOException: Transport scheme not recognised: [amqps]

113 Views Asked by At

I am trying to post a message via JMeter's JMS Publisher Sampler to Amazon MQ (ActiveMQ engine) using amqps protocol, but I am receiving a response message:

javax.jms.JMSException: Could not create Transport. Reason: java.io.IOException: Transport scheme not recognised: [amqps].

If I use another OpenWire protocol such as ssl or tcp I am successfully able to post the message. I have also verified that I have the connectivity to the broker from my machine.

I have added Apache Qpid jars and Qpid JMS in classpath.

Is there a way to post messages from JMeter using amqps protocol?

Below are the details:

  • Initial Context Factory: org.apache.activemq.jndi.ActiveMQInitialContextFactory
  • Provide URL: amqps://broker-url:5671
  • ConnectionFactory: ConnectionFactory
  • Destination: dynamicTopics/topicname
  • Use Authroization is checked.

I am using Qpid JMS 2.5, Geronimo, & ActiveMQ client 5.17.6 jars.

2

There are 2 best solutions below

1
Dmitri T On

Your question cannot be comprehensively answered if you don't provide your JMS Publisher Sampler configuration details and jmeter.log file (preferably with JMeter debug logging enabled for JMS components and the libraries you're using)

Most probably your connection factory is wrong, you need to use org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory instead of what you're currently using.

0
Justin Bertram On

The problem is that you're using the JNDI initial context factory from the OpenWire JMS client (i.e. org.apache.activemq.jndi.ActiveMQInitialContextFactory), but you're using a URL scheme (i.e. amqps) that's only supported by the Qpid JMS client. This explains why if you use a URL scheme supported by the OpenWire JMS client (i.e. tcp or ssl) it works.

Since you want to use amqps then you need to use the initial context factory from Qpid JMS:

org.apache.qpid.jms.jndi.JmsInitialContextFactory

This is described in the Qpid JMS 2.5 configuration documentation.