On 19/02/2020 11:15 am, Rick van Rein wrote:
Hello Gordon/others,
Thanks, but this does not _look_ like the right thing:
I would like to use application-properties in an application using
Proton for Python. I cannot find how to do that. Is it implemented?
I think/thought "properties" is different from "application-properties",
because it is described separately in the spec,
http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#section-message-format
http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-properties
Are you saying that the properties get split into those two, and that
the Proton API simply treats them in one go?
No, the properties as defined by the AMQP sepc are modelled as
explicitly named fields on the Message objec, e.g. subject,
correlation_id etc.
The 'properties' field on the proton Message object is exclusively
mapped to application-properties in the amqp message encoding.
I agree the naming there is confusing!
Also, the documentation says that properties have "symbol" types, not
"strings" as described in the spec,
https://qpid.apache.org/releases/qpid-proton-0.30.0/proton/python/docs/proton.html#proton.Connection.properties
http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-application-properties
Yes, but the library should handle the appropriate conversion there.
Yes, it is just called 'properties' but maps to the
application-properties field on the AMQP message. E.g. see here where a
'colour' property is set on a message:
https://github.com/apache/qpid-proton/blob/master/python/examples/colour_send.py#L45
This is typical for "symbol", one from a limited set of values, but I am
looking to cover "string", which I expect in application-properties.
Not sure I understand your concern here completely. The key and value
can be any arbitrary utf8 string. The value can also be a number if
preferred.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]