feat(azure-servicebus): Ensure Content-Type header is propagated into AMQP Message. #19664
+73
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The goal of this PR is to ensure that when
Content-Typeheader is present, it's properly propagated into the Content-Type field of the raw AMQP Message.Motivation
SmallRye Reactive Messaging relies on the raw AQMP Content-Type to determine whether it should or not convert the payload into a io.vertx.core.json.JsonObject:
If the Content-Type
application/jsonis not present, the conversion does not happen, and methods annotated with@Incomingwith a JsonObject as parameter (such as the one below) break.In a scenario where Azure Service Bus Producers are migrated to use Apache Camel, all the Consumers that are relying on SmallRye Reactive Messaging will break.
Example method:
Stack Trace when consuming the message:
Target
mainbranch)Tracking
Apache Camel coding standards and style
mvn clean install -DskipTestslocally from root folder and I have committed all auto-generated changes.