summaryrefslogtreecommitdiff
path: root/python/qpid/messaging/driver.py
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2010-06-25 18:12:28 +0000
committerRafael H. Schloming <rhs@apache.org>2010-06-25 18:12:28 +0000
commit0eac760be17bba07698ba02999d5be53c5a08c1f (patch)
treef87381c5e846778c1e2a54f6bb9ebb7668a1a2e9 /python/qpid/messaging/driver.py
parentcff7dc046568b207c9a08dea221427c54706c747 (diff)
downloadqpid-python-0eac760be17bba07698ba02999d5be53c5a08c1f.tar.gz
added support for x-amqp-0-10.{app-id,content-encoding,routing-key}
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@958055 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/messaging/driver.py')
-rw-r--r--python/qpid/messaging/driver.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/python/qpid/messaging/driver.py b/python/qpid/messaging/driver.py
index 6dab24db85..ed6b60287a 100644
--- a/python/qpid/messaging/driver.py
+++ b/python/qpid/messaging/driver.py
@@ -1159,12 +1159,15 @@ class Engine:
rt = addr2reply_to(msg.reply_to)
else:
rt = None
+ content_encoding = msg.properties.get("x-amqp-0-10.content-encoding")
dp = DeliveryProperties(routing_key=rk)
mp = MessageProperties(message_id=msg.id,
user_id=msg.user_id,
reply_to=rt,
correlation_id=msg.correlation_id,
+ app_id = msg.properties.get("x-amqp-0-10.app-id"),
content_type=msg.content_type,
+ content_encoding=content_encoding,
application_headers=msg.properties)
if subject is not None:
if mp.application_headers is None:
@@ -1242,6 +1245,12 @@ class Engine:
msg.ttl = dp.ttl
msg.redelivered = dp.redelivered
msg.properties = mp.application_headers
+ if mp.app_id is not None:
+ msg.properties["x-amqp-0-10.app-id"] = mp.app_id
+ if mp.content_encoding is not None:
+ msg.properties["x-amqp-0-10.content-encoding"] = mp.content_encoding
+ if dp.routing_key is not None:
+ msg.properties["x-amqp-0-10.routing-key"] = dp.routing_key
msg.content_type = mp.content_type
msg._transfer_id = xfr.id
return msg