Skip to content

fix: prefix AMQP extension application properties - #767

Open
yangjj-iso wants to merge 1 commit into
cloudevents:mainfrom
yangjj-iso:fix-amqp-extension-prefix
Open

yangjj-iso wants to merge 1 commit into
cloudevents:mainfrom
yangjj-iso:fix-amqp-extension-prefix

Conversation

@yangjj-iso

Copy link
Copy Markdown
Contributor

Fixes #766.

Binary AMQP messages currently serialize extensions as bare application-property names, while the reader only accepts cloudEvents:-prefixed names. For example, a traceparent or custom extension disappears after a writer/Proton encode/decode/reader round trip.

Prefix the fallback extension names in ProtonAmqpMessageWriter, as required by the AMQP binding's primary mapping. Correct the existing writer expectations and add real wire round-trip coverage for CloudEvents 0.3 and 1.0, including traceparent, tracestate, and a custom extension. The tests use no payload to isolate this change from #761.

Validation:

  • Before the fix: 4 of 20 writer tests failed, including both new round trips.
  • After the fix: MAVEN_OPTS=-Xmx384m ./mvnw -B -ntp -pl amqp -am verify -Dmaxmemory=256m passed with 136 tests (API 8, core 90, AMQP 38), plus all three modules' Javadocs.
  • git diff --check passed. No live broker or full-repository integration suite was run.

AI assistance was used to investigate, implement, and test this change.

@duglin
duglin force-pushed the fix-amqp-extension-prefix branch from a1e7a03 to 0bbb6ef Compare November 12, 2026 16:31
Preserve extensions through binary AMQP encode/decode for both supported
CloudEvents versions and correct the existing writer expectations.

Fixes cloudevents#766

Signed-off-by: redyyang <[email protected]>
@duglin
duglin force-pushed the fix-amqp-extension-prefix branch from 0bbb6ef to b79dc19 Compare November 24, 2026 12:45
@duglin
duglin requested a balanced review from Copilot November 24, 2026 12:45
@duglin

duglin commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

@yangjj-iso this will be a change for current SDK users, correct?

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified for the AMQP extension-prefix alignment.

No open issues 🎉

What changed in this PR

Fixes #766 by aligning AMQP binary extension serialization with the reader’s expected cloudEvents: prefix, preventing extensions from disappearing during round trips.

Changes:

  • Prefix fallback extension application-property names in the writer.
  • Correct writer expectations and add Proton encode/decode round-trip tests for CloudEvents 0.3 and 1.0, without payloads to isolate this fix from #761.
File Description
amqp/​src/​test/​java/​io/​cloudevents/​amqp/​ProtonAmqpMessageWriterTest.java Updates prefix expectations and verifies tracing and custom extensions survive wire round trips.
amqp/​src/​main/​java/​io/​cloudevents/​amqp/​impl/​ProtonAmqpMessageWriter.java Adds the cloudEvents: prefix to fallback extension property names.

Review effort: Balanced

This branch has not been deployed

No deployments
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.

AMQP binary writer drops extension attributes during a round trip

3 participants