qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Robie <jonathan.ro...@redhat.com>
Subject C++, Python: Setting Properties
Date Wed, 11 Feb 2009 22:31:39 GMT
C++:
=====

Message message;
message.getDeliveryProperties().setRoutingKey("request");
message.getMessageProperties().setReplyTo(ReplyTo("amq.direct", 
"reply_to_key");

In C++, I create a message, then set its properties.


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_key")

message=Message(message_properties, delivery_properties, "Hi, Rafi!")

In Python, I have to create a delivery_properties object or a 
message_properties object from a Session, then use it in a constructor. 
I have to do the same to create a reply_to.

Could we make Python more parallel to C++ here? Again, apologies if I'm 
not thinking pythonically ....

Jonathan

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Mime
View raw message