[ 
https://issues.apache.org/jira/browse/CAMEL-27791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-27791:
--------------------------------
    Description: 
Found while improving the option descriptions of camel-aws2-eventbridge for 
CAMEL-23832 (commit 
https://github.com/apache/camel/commit/99d1fbdc409a4265c151600302845e5b46e06322,
 pull request https://github.com/apache/camel/pull/31134).
These are separate problems of the component; the descriptions change only 
documents the current behavior.

h4. 1. The consumer SQS client ignores eventbridgeClient
{{EventbridgeEndpoint.getSqsClient()}} builds the SqsClient only from the 
options ({{AwsClientBuilderUtil.buildClient(configuration, 
SqsClient::builder)}}). With a custom EventBridgeClient and no region or 
credentials options, the SQS client uses the SDK default region and credentials 
chain, which can be another region or account than the EventBridge client, so 
the queue and target end up in the wrong place or creating them fails.
Proposed change: an autowired sqsClient option, or take the region and 
credentials provider from {{eventbridgeClient.serviceClientConfiguration()}}.

h4. 2. uriEndpointOverride is also applied to the SQS client
This works with a single-URI emulator (LocalStack), but with an EventBridge VPC 
or FIPS endpoint the SQS calls go to the EventBridge host.
Proposed change: a separate SQS endpoint override, or apply the override only 
to the EventBridge client.

h4. 3. Smaller issues
putEvent requires the CamelAwsEventbridgeResourcesArn header 
({{getRequiredHeader}}) although PutEvents accepts an entry without resources. 
The eventPatternFile is read with {{Charset.defaultCharset()}} instead of 
UTF-8. The consumer asks SQS for all system attributes but never maps them.


_Claude Code on behalf of davsclaus_

  was:
Found while improving the option descriptions of camel-aws2-eventbridge for 
CAMEL-23832 (pull request https://github.com/apache/camel/pull/31134).
These are separate problems of the component; the descriptions change only 
documents the current behavior.

h4. 1. The consumer SQS client ignores eventbridgeClient
{{EventbridgeEndpoint.getSqsClient()}} builds the SqsClient only from the 
options ({{AwsClientBuilderUtil.buildClient(configuration, 
SqsClient::builder)}}). With a custom EventBridgeClient and no region or 
credentials options, the SQS client uses the SDK default region and credentials 
chain, which can be another region or account than the EventBridge client, so 
the queue and target end up in the wrong place or creating them fails.
Proposed change: an autowired sqsClient option, or take the region and 
credentials provider from {{eventbridgeClient.serviceClientConfiguration()}}.

h4. 2. uriEndpointOverride is also applied to the SQS client
This works with a single-URI emulator (LocalStack), but with an EventBridge VPC 
or FIPS endpoint the SQS calls go to the EventBridge host.
Proposed change: a separate SQS endpoint override, or apply the override only 
to the EventBridge client.

h4. 3. Smaller issues
putEvent requires the CamelAwsEventbridgeResourcesArn header 
({{getRequiredHeader}}) although PutEvents accepts an entry without resources. 
The eventPatternFile is read with {{Charset.defaultCharset()}} instead of 
UTF-8. The consumer asks SQS for all system attributes but never maps them.


_Claude Code on behalf of davsclaus_


> camel-aws2-eventbridge: the consumer SQS client ignores eventbridgeClient and 
> gets the EventBridge endpoint override
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27791
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27791
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-aws2
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.25.0
>
>
> Found while improving the option descriptions of camel-aws2-eventbridge for 
> CAMEL-23832 (commit 
> https://github.com/apache/camel/commit/99d1fbdc409a4265c151600302845e5b46e06322,
>  pull request https://github.com/apache/camel/pull/31134).
> These are separate problems of the component; the descriptions change only 
> documents the current behavior.
> h4. 1. The consumer SQS client ignores eventbridgeClient
> {{EventbridgeEndpoint.getSqsClient()}} builds the SqsClient only from the 
> options ({{AwsClientBuilderUtil.buildClient(configuration, 
> SqsClient::builder)}}). With a custom EventBridgeClient and no region or 
> credentials options, the SQS client uses the SDK default region and 
> credentials chain, which can be another region or account than the 
> EventBridge client, so the queue and target end up in the wrong place or 
> creating them fails.
> Proposed change: an autowired sqsClient option, or take the region and 
> credentials provider from {{eventbridgeClient.serviceClientConfiguration()}}.
> h4. 2. uriEndpointOverride is also applied to the SQS client
> This works with a single-URI emulator (LocalStack), but with an EventBridge 
> VPC or FIPS endpoint the SQS calls go to the EventBridge host.
> Proposed change: a separate SQS endpoint override, or apply the override only 
> to the EventBridge client.
> h4. 3. Smaller issues
> putEvent requires the CamelAwsEventbridgeResourcesArn header 
> ({{getRequiredHeader}}) although PutEvents accepts an entry without 
> resources. The eventPatternFile is read with {{Charset.defaultCharset()}} 
> instead of UTF-8. The consumer asks SQS for all system attributes but never 
> maps them.
> _Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to