diff --git a/muranoapi/common/messaging/message.py b/muranoapi/common/messaging/message.py index 515efc74..724c0c9c 100644 --- a/muranoapi/common/messaging/message.py +++ b/muranoapi/common/messaging/message.py @@ -25,7 +25,7 @@ class Message(object): self._connection = connection self._message_handle = message_handle self.id = None if message_handle is None else \ - message_handle.headers.get('message_id') + message_handle.properties.get('message_id') try: self.body = None if message_handle is None else \ anyjson.loads(message_handle.body) diff --git a/muranoapi/common/messaging/mqclient.py b/muranoapi/common/messaging/mqclient.py index 6a701749..ee6c5654 100644 --- a/muranoapi/common/messaging/mqclient.py +++ b/muranoapi/common/messaging/mqclient.py @@ -91,14 +91,12 @@ class MqClient(object): if not self._connected: raise RuntimeError('Not connected to RabbitMQ') - headers = {'message_id': str(message.id)} - producer = kombu.Producer(self._connection) producer.publish( exchange=str(exchange), routing_key=str(key), body=anyjson.dumps(message.body), - headers=headers + message_id=str(message.id) ) def open(self, queue, prefetch_count=1):