Making multiple connections from a single process

24 views
Skip to first unread message

Roman Gaufman

unread,
May 17, 2013, 6:23:41 AM5/17/13
to ruby...@googlegroups.com
I have many vhosts with low traffic of messages. How would I connect to all of the vhosts from a single process? - All the examples and documentation I can find assumes a single connection per process from what I understand.

Can I run AMQP.start multiple times? - maybe in different threads? 

Michael Klishin

unread,
May 17, 2013, 6:58:00 AM5/17/13
to ruby...@googlegroups.com

2013/5/17 Roman Gaufman <hack...@gmail.com>

Can I run AMQP.start multiple times? - maybe in different threads? 

There is absolutely no need to start multiple event loops.

c1 = AMQP.connect
c2 = AMQP.connect

ch1 = AMQP::Channel.new(c1)
ch2 = AMQP::Channel.new(c2)
Reply all
Reply to author
Forward
0 new messages