-
Notifications
You must be signed in to change notification settings - Fork 79
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
Where should properties like message_id, correlation_id, etc. be set in an amqp message? #55
Comments
Yes that is correct, the properties are all top level objects. There is some tension between closely following the spec and making the library intuitive for users who don't know the spec. The properties were one such trade-off. (At one point rhea supported both, but that ended up being more confusing) |
Oops. Can this be documented in the README.md? This would help other people. Typescript type definitions would have been so useful in this case. |
/cc @anthonyvercolano - message_id will be a top level property. |
The README.md does briefly describe the message fields in text for Sender.send(). Would probably be clearer to have a distinct section on message format and refer to that from relevant places. |
@grs - Some follow up questions:
I am still a newbie with AMQP hence some of those questions may seem silly.. |
rhea will encode everything correctly on the wire i.e. properties will be in a proper properties section. application-properties and message-annotations are in nested maps as the names of those are not known in advance |
cool that makes sense. Thank you :). |
As per the AMQP 1.0 specification, I thought that the predefined message properties should be sent inside a property named properties as follows in an amqp message object:
Usually the service would send back a message which has correlation_id in it. However that did not happen.
Instead when I sent those predefined properties as top level properties as described below then the service did send me a message with correlation_id in it.
Thus it seems to me like all the predefined properties need to be sent as top level properties.
I am not sure if the service is doing something wrong over here. However, wanted to know if rhea was expecting all the predefined properties as top level properties inside the AMQP message.
The text was updated successfully, but these errors were encountered: