#include <ClientQueue.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 autodeleted. | |
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 propeties 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) |
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 messags. 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 then connection closes), or they can be shared. Shared queues can be auto deleted when they have no consumers.
We use the term 'temporary queue' to refer 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 autodeleted.
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 autodeleted. |
qpid::client::Queue::Queue | ( | std::string | name, | |
bool | autodelete, | |||
bool | exclusive, | |||
bool | durable | |||
) |
This constructor allows the autodelete, exclusive and durable propeties 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.