Class | Bunny::Client |
In: |
lib/bunny/client08.rb
|
Parent: | Qrack::Client |
ticket | [RW] |
Sets up a Bunny::Client object ready for connection to a broker/server. Client.status is set to :not_connected.
Declares an exchange to the broker/server. If the exchange does not exist, a new one is created using the arguments passed in. If the exchange already exists, the existing object is returned. If an error occurs a Bunny::ProtocolError is raised.
Requests a specific quality of service. The QoS can be specified for the current channel or for all channels on the connection. The particular properties and semantics of a QoS method always depend on the content class semantics. Though the QoS method could in principle apply to both peers, it is currently meaningful only for the server.
messages be sent in advance so that when the client finishes processing a message, the following message is already held locally, rather than needing to be sent down the channel. Prefetching gives a performance improvement. This field specifies the prefetch window size in octets. The server will send a message in advance if it is equal to or smaller in size than the available prefetch size (and also falls into other prefetch limits). May be set to zero, meaning "no specific limit", although other prefetch limits may still apply. The prefetch-size is ignored if the no-ack option is set.
of whole messages. This field may be used in combination with the prefetch-size field; a message will only be sent in advance if both prefetch windows (and those at the channel and connection level) allow it. The prefetch-count is ignored if the no-ack option is set.
true, they are applied to the entire connection.
:qos_ok if successful.
Declares a queue to the broker/server. If the queue does not exist, a new one is created using the arguments passed in. If the queue already exists, a reference to it is created, provided that the arguments passed in do not conflict with the existing attributes of the queue. If an error occurs a Bunny::ProtocolError is raised.
Asks the broker to redeliver all unacknowledged messages on a specified channel. Zero or more messages may be redelivered.
redelivered to the original recipient. If set to true, the server will attempt to requeue the message, potentially then delivering it to an alternative subscriber.
Opens a communication channel and starts a connection. If an error occurs, a Bunny::ProtocolError is raised. If successful, Client.status is set to :connected.
:connected if successful.
This method commits all messages published and acknowledged in the current transaction. A new transaction starts immediately after a commit.
:commit_ok if successful.
This method abandons all messages published and acknowledged in the current transaction. A new transaction starts immediately after a rollback.
:rollback_ok if successful.