Skip to content

Conversation

@l4mby
Copy link

@l4mby l4mby commented Jul 14, 2025

Hello, as we explained in the issue #441, it seems like message_annotations
are encoded as a simble map in the modified outcome of the message, we opened this pr for changing the encoding of message_annotations into a symbolic_map.
We made tests in our local environment with a rabbitmq-server and without the message_annotations we see no error from the server.

{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!

@grs grs merged commit e58161b into amqp:main Jul 16, 2025
5 checks passed
@grs
Copy link
Member

grs commented Jul 16, 2025

Thanks @l4mby !

@l4mby
Copy link
Author

l4mby commented Jul 17, 2025

No problem, thank you again @grs, for the work you are doing!

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

Successfully merging this pull request may close these issues.

3 participants