Jiri Danek created QPIDIT-77:
--------------------------------
Summary: Shims always send list items as well as map values and
keys encoded as string
Key: QPIDIT-77
URL: https://issues.apache.org/jira/browse/QPIDIT-77
Project: Apache QPID IT
Issue Type: Bug
Components: Proton C++ Shim, Proton Python Shim
Reporter: Jiri Danek
While examining the project and writing my own shim (see QPIDIT-76) I noticed
that the existing shims seem to behave differently than I would expect.
When sending the following message
{{#
/usr/libexec/qpid_interop_test/shims/qpid-proton-python/amqp_types_test/Sender.py
'localhost:5672'
'jms.queue.qpid-interop.amqp_types_test.map.ProtonPython.ProtonGot' 'map' '[{},
{"string:one": "ubyte:1", "string:two": "ushort:2"}, {"string:One":
"long:-1234567890", "none:": "string:None", "short:2": "int:2", "string:map":
{"char:A": "int:1", "char:B": "int:2"}, "boolean:True": "string:True",
"string:False": "boolean:False", "string:None": "none:"}]'}}
and receiving it with
{{#
/usr/libexec/qpid_interop_test/shims/qpid-proton-go/amqp_types_test/Receiver
'localhost:5672'
'jms.queue.qpid-interop.amqp_types_test.map.ProtonPython.ProtonGot' 'map' '3'}}
My shim printed wrong message, with keys and values looking like
{{string:boolean:True}}
{noformat}
map
[{},{"string:string:one":"string:ubyte:1","string:string:two":"string:ushort:2"},{"string:boolean:True":"string:string:True","string:none:":"string:string:None","string:short:2":"string:int:2","string:string:False":"string:boolean:False","string:string:None":"string:none:","string:string:One":"string:long:-1234567890","string:string:map":{"string:char:A":"string:int:1","string:char:B":"string:int:2"}}]
{noformat}
I suspected my code, but when I deliberately made my code "wrong", see commit
https://github.com/jdanekrh/qpid-interop-test/commit/bdaca47959083ef0c54656adb38285486316553b,
the shim started working.
For the above reason, I suspect that when shims (at least the Python one and
C++ one, these I tried) put data into map keys, map values and list items as
strings, without bothering to convert them.
This sounds sort of incredible how could this happen, but having no tool to
print messages in-flight and given that the change in the commit above fixed my
shim, I think it is plausible.
I looked at code of the other shims, but could not confirm or deny my
suspicion. The code is for me hard to penetrate.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]