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

Convert AMQP 1.0 props and app props to AMQP 0.9.1 props and headers (backport #10037) #11729

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Jul 16, 2024

Hi,

As requested in #10022 this is a backport to 3.12.x.

The configuration option was removed and now all the properties are always converted to headers or other appropriate properties.
The priority was moved to the Header section according to AMQP 1.0 (section 3.2.1)

  • Timestamps are milliseconds in AMQP 1.0, but in AMQP 0.9.1 it is seconds. Fixed by multiplying the timestamp by 1 000.
  • Shovel crashed if user_id was set in the message because the encoding was as utf8 while it should be a byte array.
  • Negative integers were encoded as integers - therefore leading to incorrect positive values.
  • Float values were not supported by the client.
  • Fixed priority header encoding in AMQP 1.0. It was set as uint but it should be ubyte.
  • Priority of the message is now in the Headers instead of Application Properties. This is potentially a breaking change.

Fixes: #7508

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.
If you're unsure about any of them, don't hesitate to ask on the mailing list.
We're here to help!
This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • 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

This is an automatic backport of pull request #10037 done by [Mergify](https://mergify.com).

@mergify mergify bot added the conflicts label Jul 16, 2024
Copy link
Author

mergify bot commented Jul 16, 2024

Cherry-pick of 8e954ff has failed:

On branch mergify/bp/main/pr-10037
Your branch is up to date with 'origin/main'.

You are currently cherry-picking commit 8e954ff366.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   deps/rabbitmq_shovel/test/amqp10_dynamic_SUITE.erl

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   deps/amqp10_client/src/amqp10_msg.erl
	both modified:   deps/rabbitmq_shovel/src/rabbit_amqp10_shovel.erl

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

- Timestamps are milliseconds in AMQP 1.0, but in AMQP 0.9.1 it is seconds.
  Fixed by multiplying the timestamp by 1 000.
- Shovel crashed if user_id was set in the message because the encoding
  was as utf8 while it should be a byte array.
- Negative integers were encoded as integers - therefore leading to
  incorrect positive values.
- Float values were not supported by the client.
- Fixed priority header encoding in AMQP 1.0. It was set as uint but it
  should be ubyte.
- Priority of the message is now in the Headers instead of Application
  Properties. This is potentially a breaking change.

Fixes: #7508
(cherry picked from commit 8e954ff)
Copy link
Member

@ansd ansd left a comment

Choose a reason for hiding this comment

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

Build is failing.

deps/amqp10_client/src/amqp10_msg.erl Show resolved Hide resolved
@michaelklishin michaelklishin modified the milestones: 4.0.0, 4.1.0 Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sync AMQP 1.0 Application Properties and AMQP 0.9.1 Properties/Headers in RabbitMQ Shovel
4 participants