I am having trouble setting up connection to a remote RabbitMQ server. Basically i have the consumer and the server running on a remote ubuntu machine and want my local machine to act as publisher. I have ssh access to the remote machine. I have read the answer to the following and it seems it is possible RabbitMQ on Amazon EC2 Instance & Locally?
However when i try to connect to the remote host
connection = AMQP.connect(:host => 'hostname')
puts "Connected to server...."
channel = AMQP::Channel.new(connection)
queue = channel.queue(queue_name, :auto_delete => true)
exchange = channel.default_exchange
I get a 'Detected TCP connection failure'. i ran netstat on the remote server and the port 5672 is listening.