Skip to content

Conversation

@acogoluegnes
Copy link
Contributor

@acogoluegnes acogoluegnes commented Jan 23, 2023

This PR improves the support for AMQP 1.0 message format, especially in the context of streams:

  • reuse AMQP 1.0 binary chunks if present before storing the message in the stream (when the original message is an AMQP 1.0 message)
  • support the different types of bodies a message AMQP 1.0 can have (one AMQP value, several data or AMQP sequence sections)
  • keep original order of sections

It is marked as an UTF8 string, which is not, so
strict AMQP 1.0 codecs can fail.
Instead of converting from AMQP 091 back to AMQP 1.0.
This is for AMQP 1.0 properties, application properties,
and message annotations.
In the rabbit_msg_record module, mostly. Before this commit,
only one Data section was supported. Now multiple Data sections,
multiple Sequence sections, and an AMQP value section are supported.
@acogoluegnes acogoluegnes marked this pull request as ready for review January 31, 2023 09:57
@acogoluegnes acogoluegnes added this to the 3.11.9 milestone Jan 31, 2023
acogoluegnes added a commit to rabbitmq/rabbitmq-stream-java-client that referenced this pull request Jan 31, 2023
Copy link
Contributor

@kjnilsson kjnilsson left a comment

Choose a reason for hiding this comment

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

A couple of nitpicks and a question otherwise LGTM!

@kjnilsson kjnilsson merged commit 1425e5c into main Jan 31, 2023
mergify bot pushed a commit that referenced this pull request Jan 31, 2023
* Mark AMQP 1.0 properties chunk as binary

It is marked as an UTF8 string, which is not, so
strict AMQP 1.0 codecs can fail.

* Re-use AMQP 1.0 binary chunks if available

Instead of converting from AMQP 091 back to AMQP 1.0.
This is for AMQP 1.0 properties, application properties,
and message annotations.

* Test AMQP 1.0 binary chunk reuse

* Support AMQP 1.0 multi-value body better

In the rabbit_msg_record module, mostly. Before this commit,
only one Data section was supported. Now multiple Data sections,
multiple Sequence sections, and an AMQP value section are supported.

* Add test for non-single-data-section AMQP 1.0 message

* Squash some Dialyzer warnings

* Silent dialyzer for a function for now

* Fix type declaration, use type, not atom

* Address review comments

(cherry picked from commit 1425e5c)
acogoluegnes added a commit that referenced this pull request Jan 31, 2023
Mark AMQP 1.0 properties chunk as binary (backport #7001)
@michaelklishin michaelklishin deleted the amqp-1-0-chunks-as-binaries branch February 4, 2023 02:38
Gsantomaggio added a commit to rabbitmq/rabbitmq-stream-dotnet-client that referenced this pull request Feb 14, 2023
The test StreamShouldReadTheAmqp10PropertiesMessages now works correctly due of
rabbitmq/rabbitmq-server#7001 so we removed the workaround
for the issue

Signed-off-by: Gabriele Santomaggio <[email protected]>
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.

3 participants