-
Notifications
You must be signed in to change notification settings - Fork 4k
support amqp10 message without body #14967
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
base: main
Are you sure you want to change the base?
Conversation
|
@thorhalvor please can you refer to the section of the spec where you got this interpretation? I am not sure it is correct if you look at §3.2 it reads as if only the body is required. Altogether a message consistsof the following sections: |
|
I think this PR requires further discussions (with @ansd ) and some research. I read the spec as if the body is required but it isn't completely unambiguous and allowing any non empty bare message sounds like a reasonable request. |
|
When re-reading spec I more or less agree with you @kjnilsson.
Awaiting response after you and the team have discussed further. tnx! |
This is a good data point - thanks for testing this. |
|
The empty body case is valid in both AMQP 1.0 and AMQP 0-9-1. I wouldn't say that it is a common case but if we do not support empty message bodies for AMQP 1.0, then we should at least consider it. If Azure accepts empty body messages, that's even better. Deviating a bit from the spec is something that protocol implementations almost inevitably have to consider at some point. Open source project maintainers rarely have the time and the patience to try to change the AMQP 1.0 spec over something like this. |
Proposed Changes
Currently RabbitMQ-server does not support an AMQP 1.0 message with empty/undefined body.
My understanding of the AMQP 1.0 protocol is that this is perfectly valid case.
Many systems sends a message with properties only. They could set an empty array as Body, but that need changes in sometimes hundreds of client-applications.
This change will accept if Body is 'undefined'.
I used AmqpNetLite library and published a message where BodySection is not set
and the error occured.
Types of Changes
What types of changes does your code introduce to this project?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply.You can also fill these out after creating the PR.
This is simply a reminder of what we are going to look for before merging your code.
CONTRIBUTING.mddocumentFurther Comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution
you did and what alternatives you considered, etc.