Alan Conway wrote:
Justin Ross wrote:
Hi, Josh.
Do you have some kind of user session id you could use to create
session-scoped queues? With a queue per active user, the world would
remain coherent without the need to create and destroy things too much.
Josh - if you create sessions without explcitly giving them a name,
qpid will generate a UUID as the name.
You can get it with session.getId().getName()
The request-response example does just this. In the C++ flavor:
stringstream response_queue;
response_queue << "client" << session.getId().getName();
session.queueDeclare(arg::queue=response_queue.str());
session.exchangeBind(arg::exchange="amq.direct",
arg::queue=response_queue.str(), arg::bindingKey=response_queue.str());
Remember to delete the queue when you're done with it, or queues will
accumulate on the server.
But if you want a user's queue to persist on the server, save an
identifier in a cookie or some other place.
Jonathan
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]