qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sumi <subha.manjun...@newedge.com>
Subject Re: Creation of Request and Response quese
Date Fri, 20 Apr 2012 03:22:29 GMT
Hi Robbie ,
Thank you , I am using Qpid -Java client (Qpid 0.14) , I will paste my
requirement , might be i have not understood the requirement clearly
Broker at realtime i would be connecting to AMQP broker
1.Existing objects in the broker - request exchange: "request.exchange"
,request queue: "req.queue"
response exchange: "xxx.response"

2. Client creates response queue : xxx.tmp.response.queue

3. Client creates binding between response queue and response exchange
binding key: test_routing_key

4. Client sends request to request exchange routing key of the request
message (required): XXXXX.rk
value of the reply-to exchange property of the request message: xxx.response
value of the reply-to routing key property of the request message:
test_routing_key

5. Server sends response 
routing key in the response message: test_routing_key

Request exchange is Direct exchange

For now i have created as below
Producer code:
private AMQShortString requestQueue = new AMQShortString("message_queue1");
private AMQShortString routingKey = new AMQShortString("test_routing_key");
private AMQShortString exchange = new AMQShortString("message_exchange1");

AMQDestination destinationQueue = new AMQQueue(exchange, routingKey,
requestQueue); 
//Bind queue
			session.bindQueue(requestQueue, destinationQueue.getRoutingKey(),
					arguments, destinationQueue.getExchangeName(),
					destinationQueue);
and create producer to send the message

My question is what should be the reply to property 
how to create reply to destination .

And at my consumer class am creating  queue
private AMQShortString responseQueue = new AMQShortString("response.queue");
private AMQShortString routingKey = new AMQShortString("test_routing_key");
private AMQShortString exchange = new AMQShortString("message_exchange1");

session.sendCreateQueue(responseQueue, false, true, false, map);
AMQDestination destinationQueue = new AMQQueue(exchange, routingKey,
responseQueue);

Now here i wanted to create temporary queue and give it a name , but in new
qpid i have read that the name cannot be set and the broker creates by
itself , 
How to create temporary queue with name ?
AMQQueue queue = new AMQQueue("response.exchange", "response_queue",
Boolean.TRUE);
this code returns null when i try to create temporary queue .. Please help
!!!!!

This is urgent task , am working on this from past one week still not
arrived at exact solution , hence posting all the details . Please help .
Any other info required on this please let me know

Thanks
Sumi


--
View this message in context: http://qpid.2158936.n2.nabble.com/Creation-of-Request-and-Response-quese-tp7479418p7483017.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message