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

AMQP 1.0 Output - Support for message body type #3095

Open
timo102 opened this issue Dec 19, 2024 · 0 comments
Open

AMQP 1.0 Output - Support for message body type #3095

timo102 opened this issue Dec 19, 2024 · 0 comments

Comments

@timo102
Copy link

timo102 commented Dec 19, 2024

In AMQP 0.9 the message format was simple, and the message body was always an opaque byte array. In AMQP 1.0, the message body can be 1 of 3 types: data (opaque byte array), AMQP sequence (list of polymorphic data), or AMQP value (a single instance of polymorphic data). In the current implementation, the message is always sent as an opaque byte array. If the use case is to process JSON messages (UTF-8 String), then it is better to use AMQP as it was intended and send the data as AMQP value of type string. This increases compatibility and simplifies the usage of such a message.

My suggestion is to introduce an advanced configuration option called content_type. The allowed values are:

  • opaque_binary: Same behavior as today. This is the default to keep compatibility and prevent a breaking change.
  • string: New option which sends the message as string content.

The amqp_1 input module implementation already supports the string message type, so there is no change needed.

I will provide a pull request for this enhancement.

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