Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Transport scheme NOT recognized: [amqp]

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) {

}
like image 991
madhairsilence Avatar asked Apr 03 '13 13:04

madhairsilence


Video Answer


1 Answers

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.

like image 65
Petter Nordlander Avatar answered Sep 23 '22 06:09

Petter Nordlander