I have a ruby process to consume RabbitMQ queue :
AMQP.start(:host => $AMQP_URL) do |connection|
@channel ||= AMQP::Channel.new(connection)
@queue ||= @channel.queue("results")
@queue.subscribe do |body|
puts "Received -> #{body}"
# Publish the same message again to the same queue
end
end
I know it is not practical, but I would love to know how am I supposed to publish the same message to the same queue, it didn't work out for me with direct channel, if there is anyways even just to keep the msg in the queue instead of deleting it or just to republish the msg again it would be great
Any ideas ?