[
https://issues.apache.org/jira/browse/CAMEL-26034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18131052#comment-18131052
]
Claus Ibsen commented on CAMEL-26034:
-------------------------------------
Pull request: https://github.com/apache/camel/pull/28365 (bug fixes for eleven
AWS components, one commit; the behaviour changes are in the 4.24 upgrade
guide).
_Claude Code on behalf of davsclaus_
> camel-aws2-eventbridge - putEvent does not fail when EventBridge rejects the
> event
> ----------------------------------------------------------------------------------
>
> Key: CAMEL-26034
> URL: https://issues.apache.org/jira/browse/CAMEL-26034
> Project: Camel
> Issue Type: Bug
> Components: camel-aws2
> Affects Versions: 4.18.0, 4.22.0, 4.23.0
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.24.0
>
>
> Found while adding the catalog body types of aws2-eventbridge (CAMEL-24961).
> h4. 1. putEvent does not fail when EventBridge rejects the event
> putEvent sends the body as the detail of the event, which must be a JSON
> object. A detail that is not, such as plain text, or a Map sent as its
> toString(), is rejected by EventBridge with MalformedDetail, but the exchange
> does not fail: only the {{CamelAwsEventbridgeFailedEntryCount}} header shows
> it ({{EventbridgeProducer}}, main 07d2e7a987bc, lines 403-433). The putEvent
> examples of the docs sent such a body ("Test Event"; corrected in the pull
> request of CAMEL-24961). Checked on 4.24.0-SNAPSHOT with {{camel run}}
> against the AWS emulator of {{camel infra run aws}}: "Test Event" and a Map
> gave FailedEntryCount=1, ErrorCode MalformedDetail, and no error.
> *Proposed change*: fail the exchange when an entry is rejected, or add an
> option for it, and say it in the docs.
> h4. 2. putEvent without a body fails with a bare RuntimeException
> No body fails with a {{RuntimeException}} that wraps the
> {{InvalidPayloadException}} (line 424). Checked on 4.24.0-SNAPSHOT with
> {{camel run}} against the AWS emulator of {{camel infra run aws}}.
> *Proposed change*: throw the InvalidPayloadException.
> h4. Also read in the code, not run
> * The ARNs of {{CamelAwsEventbridgeResourcesArn}} are not trimmed after the
> split on commas (line 413).
> * putRule, the default, without the event pattern header and the
> eventPatternFile option fails with an unclear error (lines 171-177).
> * {{EventbridgeConsumerIT}} is disabled ("Doesn't work with Localstack v4"),
> but the tests run on floci now, and the consumer works there: it gave the
> envelope of each event as JSON text.
> * The docs say the component supports the assumeRole operation, and write the
> uri as {{//label}}; the path is the name or the ARN of the event bus.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)