Oh darn. :) 
You have stated the obvious here, but I somehow forgot about it in this mess
with routing/binding keys :

"No, that will be done for you when you send it to the queue in the first ".

Darn this is still not working for me.

Here is the consumer flow:

AMQTopic topic = (AMQTopic)session.createTopic("amq.topic/TEST_QUEUE");
MessageConsumer consumer = session.createConsumer(topic);
consumer.setMessageListener(new MyMessageListener());
                                
//Should be a flag here, but ignore for now
while(true){}


And here is the producer flow:

Queue testQueue = session.createQueue("TEST_QUEUE; {create:always,
node:{x-declare:{auto-delete:true, exclusive:true, alternate-exchange:
'"+ALTERNATE_EXCHANGE+"'}}}");
MessageProducer producer = session.createProducer(testQueue);
TextMessage message      = session.createTextMessage("Some value");
producer.send(message);

Now this should definitely work. The message has the routing key set to
'TEST_QUEUE', and the Topic has the same binding-key. Nevertheless I do not
see any message in the Listener.

I've sent the logs.

A couple of things also.

Seems like creating a queue and a Topic with the same name is going to be a
'must' for this, because 
    sending a message with qpid.subject will not override the routing-key,
isn't it?
 
I mean if I want to have this functionality in place, the receiving topic
(because the message will get it's routing-key with the same name as the
sending queue), must have the same binding as the routing key. 
The way this is achieved is to set the topic name to the binding key.

Or is there a way to set the binding key of the topic through some x-declare
setting? For example, exclusive:true, bindingkey='...'.

I hope I make some sense here.


Thank You,
Eugene.





--
View this message in context: 
http://apache-qpid-developers.2158895.n2.nabble.com/Alternate-Exchange-with-auto-delete-queue-tp7583361p7583391.html
Sent from the Apache Qpid developers mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to