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

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.

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 <3202137046@qq.com>

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

1 participant