One of my processes creates an instance of the Messenger to listen for incoming
messages:
self.messenger = Messenger()
self.messenger.timeout = timeout
self.messenger.subscribe('amqp://~localhost:8888/incoming')
self.messenger.start()
msg = Message()
reply = Message()
while True:
if self.messenger.incoming < 10:
self.messenger.recv(10)
if self.messenger.incoming > 0:
self.messenger.get(msg)
if msg.reply_to:
reply.address = msg.reply_to
reply.correlation_id = msg.correlation_id
reply.body = msg.body
reply.durable = True
self.messenger.put(reply)
self.messenger.send()
I have another Python process that does the same thing except the only
difference is the subscribe line:
self.messenger.subscribe('amqp://~localhost:8888/outgoing')
And then I have another process that tries to connect to the incoming queue and
send a message:
self.messenger = Messenger()
self.messenger.start()
msg = Message()
msg.address = self.address
msg.body = data
msg.properties = props
msg.durable = True
self.messenger.put(msg)
self.messenger.send()
Thanks,
Taylor
________________________________
From: Rafael Schloming [[email protected]]
Sent: Thursday, January 17, 2013 11:10 AM
To: [email protected]
Subject: Re: Subscribing to multiple queue names on the same host/port
On Thu, Jan 17, 2013 at 10:06 AM, Eagy, Taylor <[email protected]>wrote:
> One of the nice things I liked about the Java Qpid broker was that you
> could create multiple queues bound on the same host:port using the
> virutualhosts.xml config. When I try subscribing to
> amqp://localhost:8888/incoming and amqp://localhost:8888/outgoing, it
> complains that the address is already in use. Does the Messenger API
> support multiple queues per host:port? Also are there any plans for Proton
> to load config file similar to the Qpid brokers?
>
Can you post a code snippet of what you're trying to do?
--Rafael