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(io : IO, bytesize : Int, mandatory = false, immediate = false, props properties = Properties.new, &blk)
Publish a message directly to the queue, block is called when message is confirmed
-
#publish(message, mandatory = false, immediate = false, props properties = Properties.new, &blk)
Publish a message directly to the queue, block is called when message is confirmed
-
#publish_confirm(io : IO, bytesize : Int, mandatory = false, immediate = false, props properties = Properties.new)
Publish a message directly to the queue, block is called when message is confirmed
-
#publish_confirm(message, mandatory = false, immediate = false, props properties = Properties.new)
Publish a message directly to the queue, block is called when message is confirmed
-
#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 a message directly to the queue, block is called when message is confirmed
Publish a message directly to the queue, block is called when message is confirmed
Publish a message directly to the queue, block is called when message is confirmed
Publish a message directly to the queue, block is called when message is confirmed
Consume messages from the queue
Unbind the queue from an exchange
Unsubscribe from the queue
See Channel#basic_cancel
for more details