I am trying to send a message with custom properties using the Python binding of Qpid Proton, but I can't find the right way to do it...
message = Message()
message.body = u"hello body"
data = Data()
data.put_map()
data.enter()
data.put_string("key")
data.put_string("value")
data.exit()
message.properties = data
messenger.put(message)
messenger.send()
Results in...
Traceback (most recent call last):
File "./candy_ingest.py", line 37, in <module>
messenger.put(message)
File "/usr/lib/python2.7/dist-packages/proton.py", line 473, in put
message._pre_encode()
File "/usr/lib/python2.7/dist-packages/proton.py", line 781, in _pre_encode
props.put_object(self.properties)
File "/usr/lib/python2.7/dist-packages/proton.py", line 2036, in put_object
putter = self.put_mappings[obj.__class__]
KeyError: <class proton.Data at 0x2320420>
Any help welcome!
TIA, Thomas.