# File lib/chef/index_queue/amqp_client.rb, line 68 def queue_for_object(obj_id) retries = 0 vnode_tag = obj_id_to_int(obj_id) % VNODES begin yield amqp_client.queue("vnode-#{vnode_tag}", :passive => false, :durable => true, :exclusive => false, :auto_delete => false) rescue Bunny::ServerDownError, Bunny::ConnectionError, Errno::ECONNRESET disconnected! if (retries += 1) < 2 Chef::Log.info("Attempting to reconnect to the AMQP broker") retry else Chef::Log.fatal("Could not re-connect to the AMQP broker, giving up") raise end end end