-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Message Properties: 'type' property #201
Comments
Hello @notmeta. Thanks for all your viable suggestions. First, we should rename In a second hand, we should probably use the aioamqp.Properties to be used in channel.publish instead for a cleaner and self describing API, not an obscure dict argument. What do you think ? |
Both sound good to me! |
@notmeta I may have the time to propose the first part. |
@dzen I may find some time to work on the second bit, if you're unable to. Also I had a thought: since this is going to be a breaking change, how should the version upgrade go? |
I think since we do not released a 1.x version, we may change the API. I think we did it already. |
@notmeta : do you want a 0.13.x release ? |
@dzen no rush on my end (as I've already fixed it in my codebase) but I'm sure others might encounter issues if they use that property. |
Since the new release aioamqp uses pamqp to encode/decode frames.
This also includes properties, but a subtle difference in naming for the 'type' property caused problems when I upgraded to the latest version.
aioamqp uses 'type', whereas pamqp uses 'message_type'.
This is not immediately obvious as the current aioamqp docs still specify 'type', see https://github.com/Polyconseil/aioamqp/blob/master/docs/api.rst#consuming-messages
Example:
I suggest one or more of the following changes:
{'message_type': ... }
message_type
aioamqp.Properties
into a dict which then convertstype
intomessage_type
to be suitable for publishing (this is something I do in my code manually as there is no way to dynamically get all property keys and turn them into a dict)aioamqp.Properties
a.__dict__
methodchannel.publish
method which takesaioamqp.Properties
as an argument instead of dictThe text was updated successfully, but these errors were encountered: