Skip to content
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

Decode restricted types using the correct types (rather than the wire type) #12

Open
kpvdr opened this issue Apr 25, 2017 · 1 comment

Comments

@kpvdr
Copy link
Owner

kpvdr commented Apr 25, 2017

Currently the decoder will decode types to their AMQP type without regard to the field type data. Use the field type data to force the use of a restricted type when it is encountered. This will also eliminate the requires/provides validation errors currently being displayed.

@kpvdr
Copy link
Owner Author

kpvdr commented May 1, 2017

This issue currently shows up as a spurious validation error in two common cases:

WARNING: validation: Field "address" requires "address", but is not provided by value type "string"

and

WARNING: validation: Field "distribution-mode" requires "distribution-mode", but is not provided by value type "symbol"

These occur because these types are decoded on the wire as type string and type symbol respectively, but the AMQP specification requires that they be treated as restricted types address and distribution-mode respectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant