If we wanted to make C++ symmetrical with Python, we might want to add a
constructor that allows delivery and message properties to be specified
- would this be useful?
It's easy to do this other ways, but symmetry between the languages is
good ....
Jonathan
Python:
----------
delivery_properties = session.delivery_properties()
delivery_properties.routing_key="routing_key"
message_properties = session.message_properties()
message_properties.reply_to = session.reply_to("amq.direct", reply_to)
for line in lines:
session.message_transfer(destination="amq.direct",
message=Message(message_properties, delivery_properties, line))
C++ (expanding the current API):
--------------------------------------------
DeliveryProperties dp = message.getDeliveryProperties();
dp.setRoutingKey("request");
MessageProperties mp = message.getMessageProperties();
mp.setReplyTo(ReplyTo("amq.direct", response_queue.str()));
for (int i=0; i<count; i++) {
stringstream message_data;
message_data << "Message " << i;
Message message(arg:deliveryProperties=dp, arg:messageProperties=mp,
arg:messageData=message_data);
session.messageTransfer(arg::content=message,
arg::destination="amq.direct");
}
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]