Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ define_outcome({
fields:[
{name:'delivery_failed', type:'boolean'},
{name:'undeliverable_here', type:'boolean'},
{name:'message_annotations', type:'map'}
{name:'message_annotations', type:'symbolic_map'}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does setting the keys to explicit symbols work? The keys here are defined to be either symbols or ulongs (https://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-annotations). While restricting to only symbols isn't terrible, it should also be possible to just set the keys as symbols in your application.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, thank you for the answer and sorry for the delay. Yes when we encode the key as symbols there is no error, but we cannot get back the annotations that were set. I also check the documentations and i found this link for the modified outcome in which the message_annotations are encoded as fields, from the documentation i understand that in this case the keys are restricted to symbols. Am i missing some information? Could you please, explain further? Our objective is to modify the message with message_annotations but it seems that these are ignored. Thank you in advance

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are quite right! It is indeed restricted to only allow symbolic keys in that outcome. I had wrongly assumed it was the same type as the message-annotations themselves, sorry!

]});

module.exports = message;