Skip to content

Conversation

@thorhalvor
Copy link
Contributor

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

    var message = new Message
    {
        // BodySection = <notset>
        Properties = new Properties()
    };

and the error occured.

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)
  • Build system and/or CI

Checklist

Put an x in 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.

  • Mandatory: I (or my employer/client) have have signed the CA (see https://github.com/rabbitmq/cla)
  • I have read the CONTRIBUTING.md document
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally with my changes
  • If relevant, I have added necessary documentation to https://github.com/rabbitmq/rabbitmq-website
  • If relevant, I have added this change to the first version(s) in release-notes that I expect to introduce it

Further 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.

@kjnilsson
Copy link
Contributor

@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:
• Zero or one header.
• Zero or one delivery-annotations.
• Zero or one message-annotations.
• Zero or one properties.
• Zero or one application-properties.
• The body consists of one of the following three choices: one or more data sections, one or more amqp-sequence
sections, or a single amqp-value section.
• Zero or one footer.

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.

2 participants