Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET | Apache Qpid Documentation |
A message sent to or received from the broker. More...
#include <qpid/client/Message.h>
Public Member Functions | |
Message (const std::string &data=std::string(), const std::string &routingKey=std::string()) | |
Create a Message. | |
Message (MessageImpl *) | |
Message (const Message &) | |
~Message () | |
Message & | operator= (const Message &) |
void | swap (Message &) |
void | setData (const std::string &) |
const std::string & | getData () const |
std::string & | getData () |
void | appendData (const std::string &) |
bool | hasMessageProperties () const |
framing::MessageProperties & | getMessageProperties () |
const framing::MessageProperties & | getMessageProperties () const |
bool | hasDeliveryProperties () const |
framing::DeliveryProperties & | getDeliveryProperties () |
const framing::DeliveryProperties & | getDeliveryProperties () const |
std::string | getDestination () const |
The destination of messages sent to the broker is the exchange name. | |
bool | isRedelivered () const |
Check the redelivered flag. | |
void | setRedelivered (bool redelivered) |
Set the redelivered flag. | |
framing::FieldTable & | getHeaders () |
Get a modifyable reference to the message headers. | |
const framing::FieldTable & | getHeaders () const |
Get a non-modifyable reference to the message headers. | |
const framing::SequenceNumber & | getId () const |
A message sent to or received from the broker.
std::cout << "Response: " << message.getData() << std::endl;
message.setData("That's all, folks!");
message.appendData(" ... let's add a bit more ...");
message.getDeliveryProperties().setRoutingKey("control");
message.getDeliveryProperties().setDeliveryMode(PERSISTENT);
message.getDeliveryProperties().setPriority(9);
message.getDeliveryProperties().setTtl(100);
if (! message.hasDeliveryProperties()) { ... }
*request.getMessageProperties().setReplyTo(ReplyTo("amq.direct", response_queue.str()));
*routingKey = request.getMessageProperties().getReplyTo().getRoutingKey(); *exchange = request.getMessageProperties().getReplyTo().getExchange();
message.getMessageProperties().setContentType("text/plain");
message.getMessageProperties().setContentEncoding("text/plain");
request.getMessageProperties().hasReplyTo();
*message.getHeaders().getString("control");
*message.getHeaders().setString("control","continue");
qpid::client::Message::Message | ( | const std::string & | data = std::string() , |
const std::string & | routingKey = std::string() |
||
) |
Create a Message.
data | Data for the message body. |
routingKey | Passed to the exchange that routes the message. |
qpid::client::Message::Message | ( | const Message & | ) |
void qpid::client::Message::appendData | ( | const std::string & | ) |
const std::string& qpid::client::Message::getData | ( | ) | const |
std::string& qpid::client::Message::getData | ( | ) |
const framing::DeliveryProperties& qpid::client::Message::getDeliveryProperties | ( | ) | const |
std::string qpid::client::Message::getDestination | ( | ) | const |
The destination of messages sent to the broker is the exchange name.
The destination of messages received from the broker is the delivery tag identifyig the local subscription (often this is the name of the subscribed queue.)
Get a modifyable reference to the message headers.
const framing::FieldTable& qpid::client::Message::getHeaders | ( | ) | const |
Get a non-modifyable reference to the message headers.
const framing::SequenceNumber& qpid::client::Message::getId | ( | ) | const |
const framing::MessageProperties& qpid::client::Message::getMessageProperties | ( | ) | const |
bool qpid::client::Message::hasDeliveryProperties | ( | ) | const |
bool qpid::client::Message::hasMessageProperties | ( | ) | const |
bool qpid::client::Message::isRedelivered | ( | ) | const |
Check the redelivered flag.
void qpid::client::Message::setData | ( | const std::string & | ) |
void qpid::client::Message::setRedelivered | ( | bool | redelivered | ) |
Set the redelivered flag.
void qpid::client::Message::swap | ( | Message & | ) |