views:

252

answers:

1

I am using the Ruby AMQP Carrot library and I am trying to talk to a test RabbitMQ server on a virtual machine. The AMQP port is open on the machine but I can't get Carrot to establish an external connection. I have tried the following:

Carrot.queue('message', :durable => true, :server => '192.168.162.176')

Carrot.queue('message', :durable => true, :host => '192.168.162.176')

+1  A: 

I talked with the Carrot developer and this is the answer he gave me and it works great:

@client = Carrot.new(
 :host   => host,
 :port   => port.to_i,
 :user   => @opts['user'],
 :pass   => @opts['pass'],
 :vhost  => @opts['vhost'],
 :insist => @opts['insist']
)

queue = @client.queue('foo')
hacintosh