A message sent to or received from the broker.
More...
#include <qpid/client/Message.h>
List of all members.
Detailed Description
A message sent to or received from the broker.
Getting and setting message contents
-
getData()
std::cout << "Response: " << message.getData() << std::endl;
-
setData()
message.setData("That's all, folks!");
-
appendData()
message.appendData(" ... let's add a bit more ...");
Getting and Setting Delivery Properties
-
getDeliveryProperties()
message.getDeliveryProperties().setRoutingKey("control");
message.getDeliveryProperties().setDeliveryMode(PERSISTENT);
message.getDeliveryProperties().setPriority(9);
message.getDeliveryProperties().setTtl(100);
-
hasDeliveryProperties()
if (! message.hasDeliveryProperties()) {
...
}
Getting and Setting Message Properties
-
getMessageProperties()
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");
-
hasMessageProperties()
request.getMessageProperties().hasReplyTo();
Getting and Setting Application Headers
Constructor & Destructor Documentation
Create a Message.
- Parameters:
-
data | Data for the message body. |
routingKey | Passed to the exchange that routes the message. |
qpid::client::Message::Message |
( |
MessageImpl * |
| ) |
|
qpid::client::Message::Message |
( |
const Message & |
| ) |
|
qpid::client::Message::~Message |
( |
| ) |
|
Member Function Documentation
void qpid::client::Message::appendData |
( |
const std::string & |
| ) |
|
const std::string& qpid::client::Message::getData |
( |
| ) |
const |
framing::DeliveryProperties& qpid::client::Message::getDeliveryProperties |
( |
| ) |
|
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.
Get a non-modifyable reference to the message headers.
framing::MessageProperties& qpid::client::Message::getMessageProperties |
( |
| ) |
|
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 & |
| ) |
|
The documentation for this class was generated from the following file: