Claus Ibsen created CAMEL-26260:
-----------------------------------
Summary: camel-alibaba-eventbridge - a byte[] or InputStream body
fails instead of being read as JSON text
Key: CAMEL-26260
URL: https://issues.apache.org/jira/browse/CAMEL-26260
Project: Camel
Issue Type: Bug
Reporter: Claus Ibsen
Fix For: 4.24.0
Found while adding the catalog body types of alibaba-eventbridge (CAMEL-24961,
PR #28409).
h4. 1. A byte[] or stream body fails
{{AlibabaEventBridgeUtils.toCloudEvent}} (main 2a465aa4814c, lines 125-157)
accepts a CloudEvent, a Map or a String, and throws "Exchange body must be a
CloudEvent, Map or JSON string" for anything else, so a JSON body from an HTTP
or Kafka consumer (byte[] or stream) fails. Checked on 4.24.0-SNAPSHOT with a
Mockito client.
Proposed: convert other bodies to String with the type converter and handle
them as JSON text.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)