#include <Queue.h>
Public Member Functions | |
Queue () | |
Creates an unnamed, non-durable, temporary queue. | |
Queue (std::string name) | |
Creates a shared, non-durable queue with a given name, that will not be automatically deleted. | |
Queue (std::string name, bool temp) | |
Creates a non-durable queue with a given name. | |
Queue (std::string name, bool autodelete, bool exclusive, bool durable) | |
This constructor allows the AutoDelete, Exclusive and Durable properties to be explictly set. | |
const std::string & | getName () const |
void | setName (const std::string &) |
bool | isAutoDelete () const |
bool | isExclusive () const |
bool | isDurable () const |
void | setDurable (bool durable) |
A 'handle' used to represent an AMQP queue in the Channel methods. Creating an instance of this class does not cause the queue to be created on the broker. Rather, an instance of this class should be passed to Channel::declareQueue() to ensure that the queue exists or is created.
Queues hold messages and allow clients to consume (see Channel::consume()) or get (see Channel::get()) those messages. A queue receives messages by being bound to one or more Exchange. Messages published to that exchange may then be routed to the queue based on the details of the binding and the type of the exchange (see Channel::bind()).
Queues are identified by a name. They can be exclusive (in which case they can only be used in the context of the connection over which they were declared, and are deleted when that connection closes), or they can be shared. Shared queues can be automatically deleted when they have no consumers.
The term 'temporary queue' refers to an exclusive queue.
qpid::client::Queue::Queue | ( | ) |
Creates an unnamed, non-durable, temporary queue.
A name will be assigned to this queue instance by a call to Channel::declareQueue().
qpid::client::Queue::Queue | ( | std::string | name | ) |
Creates a shared, non-durable queue with a given name, that will not be automatically deleted.
name | the name of the queue. |
qpid::client::Queue::Queue | ( | std::string | name, | |
bool | temp | |||
) |
Creates a non-durable queue with a given name.
name | the name of the queue | |
temp | if true the queue will be a temporary queue, if false it will be shared and not automatically deleted. |
qpid::client::Queue::Queue | ( | std::string | name, | |
bool | autodelete, | |||
bool | exclusive, | |||
bool | durable | |||
) |
This constructor allows the AutoDelete, Exclusive and Durable properties to be explictly set.
Note however that if Exclusive is true, AutoDelete has no meaning as Exclusive queues are always destroyed when the connection that created them is closed.