class AMQP::Client::Queue
- AMQP::Client::Queue
- Reference
- Object
Overview
High-level representation of a Queue
Example:
client = AMQP::Client.new.connect
ch = client.channel
q = ch.queue("foobar")
q.bind("amq.fanout", "")
q.subscribe do |msg|
puts msg.body_io
end
Defined in:
amqp-client/queue.crInstance Method Summary
-
#bind(exchange : String, routing_key : String, no_wait = false, args arguments = Arguments.new)
Bind the queue to an exchange
-
#consumer_count
Check number of consumers of the queue
-
#delete(if_unused = false, if_empty = false)
Delete the queue
-
#get(no_ack = true)
Poll the queue for a message
-
#message_count
Check number of messages in the queue
-
#name : String
Name of the queue
-
#publish(io : IO, bytesize : Int, mandatory = false, immediate = false, props properties = Properties.new)
Publish a message directly to the queue
-
#publish(message, mandatory = false, immediate = false, props properties = Properties.new)
Publish a message directly to the queue
-
#publish_confirm(io : IO, bytesize : Int, mandatory = false, immediate = false, props properties = Properties.new)
Publish and confirm a message directly to the queue
-
#publish_confirm(message, mandatory = false, immediate = false, props properties = Properties.new)
Publish and confirm a message directly to the queue
-
#purge
Purge the queue
-
#subscribe(tag = "", no_ack = true, exclusive = false, block = false, args arguments = Arguments.new, work_pool = 1, &blk : DeliverMessage -> Nil)
Consume messages from the queue
-
#unbind(exchange : String, routing_key : String, args arguments = Arguments.new)
Unbind the queue from an exchange
-
#unsubscribe(consumer_tag, no_wait = true)
Unsubscribe from the queue
Instance Method Detail
Bind the queue to an exchange
Delete the queue
Publish a message directly to the queue
Publish a message directly to the queue
Publish and confirm a message directly to the queue
Publish and confirm a message directly to the queue
Consume messages from the queue
Unbind the queue from an exchange
Unsubscribe from the queue
See Channel#basic_cancel
for more details