Am trying to use AMQP with ActiveMQ and am getting the following error
Transport scheme NOT recognized: [amqp]
This is my code
ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(
"amqp://localhost:61616");
Connection connection = null;
try {
connection = connectionFactory.createConnection();
connection.start();
Session session = connection.createSession(false,
Session.AUTO_ACKNOWLEDGE);
Queue queue = session.createQueue("somequeue");
MessageProducer producer = session.createProducer(queue);
// We will send a small text message saying 'Hello'
TextMessage message = session.createTextMessage();
message.setText("Publishing : New Message ");
producer.send(message);
connection.close();
} catch (Exception e) {
}
Please note that AMQP in ActiveMQ is implemented in the Server only and not in the JMS client. The JMS client actually implements the "default" OpenWire protocol (and the intra-JVM transport).
You should use some other client library to communicate with ActiveMQ using AMQP, such as Apache QPID which is recommended by ActiveMQ.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With