We are using Azure service bus as a messaging application. Sending data to Azure service bus using Apache camel. It was working in version 3.21.2. We have upgraded the version to 4.4.3. After upgrading the version, getting the below error.
Error Stacktrace: com.azure.messaging.servicebus.ServiceBusException: No encoding is known for map entry value of type: io.cloudevents.SpecVersion
I tried removing headers but it was not helpful.
Changes were made in Camel 4.4 to propagate headers from the Camel Exchange
to Service Bus application properties consistent with many other message-based Camel components.
Unfortunately, the ServiceBusHeaderFilterStrategy
failed to verify that the propagated headers are of a type that can be encoded as an application property by the underlying client libraries. https://issues.apache.org/jira/browse/CAMEL-21211 has been raised to track this.
Prior to a fix being released for this issue, you can work around the problem by implementing configuring a custom HeaderFilterStrategy
for the Service Bus producer endpoint. I would suggest instantiating and configuring your own ServiceBusHeaderFilterStrategy
to filter the headers that can’t be encoded.