Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET | Apache Qpid Documentation |
Represents an address to which messages can be sent and from which messages can be received. More...
#include <qpid/messaging/Address.h>
Public Member Functions | |
Address () | |
Address (const std::string &address) | |
Address (const std::string &name, const std::string &subject, const Variant::Map &options, const std::string &type="") | |
Address (const Address &address) | |
~Address () | |
Address & | operator= (const Address &) |
const std::string & | getName () const |
void | setName (const std::string &) |
const std::string & | getSubject () const |
void | setSubject (const std::string &) |
bool | hasSubject () const |
const Variant::Map & | getOptions () const |
Variant::Map & | getOptions () |
void | setOptions (const Variant::Map &) |
std::string | getType () const |
void | setType (const std::string &) |
const Variant & | getOption (const std::string &key) const |
std::string | toStr () const |
operator bool () const | |
bool | operator! () const |
Represents an address to which messages can be sent and from which messages can be received.
Often a simple name is sufficient for this, however this can be augmented with a subject pattern and options.
All parts of an address can be specified in a string of the following form:
<address> [ / <subject> ] ; [ { <key> : <value> , ... } ]
Here the <address> is a simple name for the addressed entity and <subject> is a subject or subject pattern for messages sent to or received from this address. The options are specified as a series of key value pairs enclosed in curly brackets (denoting a map). Values can be nested maps, or lists (which are denoted as a comma separated list of values inside square brackets, e.g. [a, b, c]).
The currently supported options are as follows:
create | Indicate whether the address should be automatically created or not. Can be one of always, never, sender or receiver. The properties of the node to be created can be specified via the node-properties option (see below). |
assert | Indicate whether or not to assert any specified node-properties match the address. Can be one of always, never, sender or receiver. |
delete | Indicate whether or not to delete the addressed nide when a sender or receiver is cancelled. Can be one of always, never, sender or receiver. |
node-properties | A nested map of properties of the addressed entity or 'node'. These can be used when automatically creating it, or to assert certain properties. The valid node-properties are:
|
For receivers there are some further options of interest:
no-local | (only relevant for topics at present) specifies that the receiver does not want to receiver messages published to the topic that originate from a sender on the same connection |
browse | (only relevant for queues) specifies that the receiver does not wish to consume the messages, but merely browse them |
durable | (only relevant for topics at present) specifies that a durable subscription is required |
reliability | indicates the level of reliability that the receiver expects. Can be one of unreliable, at-most-once, at-least-once or exactly-once (the latter is not yet correctly supported). |
filter | (only relevant for topics at present) allows bindings to be created for the queue that match the given criteris (or list of criteria). |
x-properties | allows protocol or implementation specific options to be specified for a receiver; this is a nested map and currently the implementation only recognises two specific nested properties within it (all others are passed through in the arguments of the message-subscribe command):
|
Definition at line 141 of file Address.h.
qpid::messaging::Address::Address | ( | ) |
qpid::messaging::Address::Address | ( | const std::string & | address | ) |
qpid::messaging::Address::Address | ( | const std::string & | name, | |
const std::string & | subject, | |||
const Variant::Map & | options, | |||
const std::string & | type = "" | |||
) |
qpid::messaging::Address::Address | ( | const Address & | address | ) |
qpid::messaging::Address::~Address | ( | ) |
const std::string& qpid::messaging::Address::getName | ( | ) | const |
const Variant& qpid::messaging::Address::getOption | ( | const std::string & | key | ) | const |
Variant::Map& qpid::messaging::Address::getOptions | ( | ) |
const Variant::Map& qpid::messaging::Address::getOptions | ( | ) | const |
const std::string& qpid::messaging::Address::getSubject | ( | ) | const |
std::string qpid::messaging::Address::getType | ( | ) | const |
bool qpid::messaging::Address::hasSubject | ( | ) | const |
qpid::messaging::Address::operator bool | ( | ) | const |
bool qpid::messaging::Address::operator! | ( | ) | const |
void qpid::messaging::Address::setName | ( | const std::string & | ) |
void qpid::messaging::Address::setOptions | ( | const Variant::Map & | ) |
void qpid::messaging::Address::setSubject | ( | const std::string & | ) |
void qpid::messaging::Address::setType | ( | const std::string & | ) |
std::string qpid::messaging::Address::toStr | ( | ) | const |