qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wayna Runa <waynar...@gmail.com>
Subject How to create a Destination to RabbitMQ custom exchange using qpid-client-0.30
Date Wed, 17 Dec 2014 16:45:01 GMT
Hi there again!

I am trying to connect to RabbitMQ queue (AMQP 0-9-1) via custom exchange
using Destination (Binding URL) without success.

I have tried several definitions of "destination", here my JNDI config:

connectionfactory.myRabbitMQConnectionFactory1 = amqp://admin:xxx@clientid

destination.myDestination1 = direct://ex_test1/rk_test1/q_test1
destination.myDestination2 =
destination.myDestination3 =

My Java code is:

System.setProperty("qpid.amqp.version", "0-91");
*System.setProperty("qpid.dest_**syntax", "BURL");*
ConnectionFactory connectionFactory = (ConnectionFactory)
Connection connection = connectionFactory.createConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

TextMessage message = session.createTextMessage("Hello world - DESTINATION
BURL !!");
Destination destination = (Destination)
context.lookup("myJndiDirectDestination1"); // tested with 1, 2 and
MessageProducer messageProducerD = session.createProducer(destination);


Here, my custom exchange is "ex_test1" and I have used different values for
routing keys.
I have to created previously the exchange (ex_test1) with different routing
keys, for example:

binding-a) ex_test1 ~> rk_test1 ~> q_test1
binding-b) ex_test1 ~> empty ~> q_test1
binding-c) ex_test1 ~> q_test1 ~> q_test1
binding-d) amq.direct ~> q_test1 ~> q_test1
binding-e) amq.direct ~> rk_test1 ~> q_test1

When running this code, no errors are shown, only *binding-d* and
*binding-e* work and the message is published in RabbitMQ.

They have in the header thw following:

Exchange :   amq.direct
headers:     JMS_QPID_DESTTYPE:    1

What is the correct definition of DESTINATION using custom exchange?


-- wr

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message