diff options
-rw-r--r-- | python/qpid/messaging/driver.py | 8 | ||||
-rw-r--r-- | python/qpid/messaging/message.py | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/python/qpid/messaging/driver.py b/python/qpid/messaging/driver.py index 2175715c77..a3c565f205 100644 --- a/python/qpid/messaging/driver.py +++ b/python/qpid/messaging/driver.py @@ -980,6 +980,7 @@ class Engine: break for snd in ssn.senders: + # XXX: should included snd.acked in this if snd.synced >= snd.queued and sst.need_sync: sst.write_cmd(ExecutionSync(), sync_noop) @@ -1182,9 +1183,11 @@ class Engine: if msg.priority is not None: dp.priority = msg.priority if msg.ttl is not None: - dp.ttl = msg.ttl + dp.ttl = long(msg.ttl*1000) enc, dec = get_codec(msg.content_type) body = enc(msg.content) + + # XXX: this is not safe for out of order, can this be triggered by pre_ack? def msg_acked(): # XXX: should we log the ack somehow too? snd.acked += 1 @@ -1243,7 +1246,8 @@ class Engine: if dp.delivery_mode is not None: msg.durable = dp.delivery_mode == delivery_mode.persistent msg.priority = dp.priority - msg.ttl = dp.ttl + if dp.ttl is not None: + msg.ttl = dp.ttl/1000.0 msg.redelivered = dp.redelivered msg.properties = mp.application_headers or {} if mp.app_id is not None: diff --git a/python/qpid/messaging/message.py b/python/qpid/messaging/message.py index a96a6da0ac..e2406f16e7 100644 --- a/python/qpid/messaging/message.py +++ b/python/qpid/messaging/message.py @@ -74,12 +74,20 @@ class Message: @type id: str @ivar id: the message id + @type subject: str + @ivar subject: message subject @type user_id: str @ivar user_id: the user-id of the message producer @type reply_to: str @ivar reply_to: the address to send replies @type correlation_id: str @ivar correlation_id: a correlation-id for the message + @type durable: bool + @ivar durable: message durability + @type priority: int + @ivar priority: message priority + @type ttl: float + @ivar ttl: time-to-live measured in seconds @type properties: dict @ivar properties: application specific message properties @type content_type: str |