Skip to content

AMQP 1.0 Application Properties lost when shovelling to an AMQP 0.9.1 broker #13957

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

Open
DHoskin-Aurizon opened this issue May 27, 2025 · 4 comments
Labels

Comments

@DHoskin-Aurizon
Copy link

Describe the bug

RabbitMQ Shovel currently does not keep the AMQP 1.0 Application Properties and AMQP 0.9.1 Properties/Headers in sync when copying messages between exchanges or queues when transferring messages between AMQP 1.0 and AMQP 0.9.1 brokers as per https://www.rabbitmq.com/docs/conversions

Properties/Headers are retained when shovelling from AMQP 0.9.1 -> AMQP 1.0 but are lost when shovelling from AMQP 1.0 -> AMQP 0.9.1 in RabbitMQ V4.*.

Properties/Headers are retained in both directions in RabbitMQ V3.12.11+ and V3.13.5+.

Reproduction steps

  1. Set up a shovel from AMPQ 1.0 to AMQP 0.9.1
  2. Publish a message to the AMQP 1.0 broker with Application Properties
  3. The received message on the AMQP 0.9.1 broker has no Properties/Headers

Expected behavior

The message received from the shovel contains the converted Properties/Headers.

Additional context

Refer to #7508 and #11729

@ansd
Copy link
Member

ansd commented May 27, 2025

As explained in #11729 (comment), the solution for RabbitMQ 4.x should use the rabbit_queue_type interface directly and should convert between protocols using the mc (message container) module.

Advantages:

@DHoskin-Aurizon
Copy link
Author

DHoskin-Aurizon commented May 28, 2025

Hi @ansd, my apologies I misunderstood your prior message. I thought you were referring to a different method of fixing the bug, not that there already exists different functionality to achieve this.

Can you please direct me to the documentation on how to set this up as I have searched the RabbitMQ docs and tried a few different configurations with no success.

Below is my setup:

  • RabbitMQ 4.1.0
  • Messages generated in Azure Service Bus with Broker Properties (correlationID) & Custom Properties (Type, Version and routing_key) (AMQP 1.0)
  • RabbitMQ shovel used to read from Service Bus and route messages to a RabbitMQ queue.
  • Messages consumed using AMQP 0.9.1

I was initially doing the conversion using the shovel (Source protocol AMQP 1.0 & destination AMQP 0.9.1) and getting no properties. I have just attempted to shovel with both source and destination AMQP 1.0 and still getting no properties other than delivery_mode: 2 being added.

As mentioned, conversion using the shovel successfully retains the properties for RabbitMQ V3.12.11+ and V3.13.5+.

@michaelklishin
Copy link
Collaborator

@DHoskin-Aurizon David is describing a different implementation for 4.x (compared to what was accepted for 3.13.x). That's not the same as "there already exists different functionality to achieve this".

What exists is a set of internal API elements that should be used in all 4.x release series.

@DHoskin-Aurizon
Copy link
Author

@michaelklishin thanks for the clarification. If I understand your comment correctly, the functionality I am seeking is indeed a bug in the 4.x release series.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants