[ 
https://issues.apache.org/jira/browse/CAMEL-18131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17624869#comment-17624869
 ] 

Alex Arana commented on CAMEL-18131:
------------------------------------

I recently upgraded to Camel _3.19.0_ which adds a HealthCheck for {{aws2-sqs}} 
components from the old verifier extension and it has broken an existing 
consumer service which now returns *DOWN* from its health check.

After doing some digging I figured the cause of the problem is due to the new 
health check relying on the relevant region and credential details being 
configured as part of the consumer configuration to perform a connectivity 
test. An option exists to use an already realised AWS component configured 
within the consumer component via useDefaultCredentialsProvider (which is false 
by default). However, we found that even when that option is enabled, check 
still relies on the AWS region having been configured at the component level:

Sqs2ConsumerHealthCheck:

{{Sqs2Configuration configuration = sqs2Consumer.getConfiguration();
// causes NPE while fetching region from component configuration object}}
{{if 
(!SqsClient.serviceMetadata().regions().contains(Region.of(configuration.getRegion())))
 {}}
{{    builder.message("The service is not supported in this region");}}
{{    builder.down();}}
{{    return;}}
{{}}}

```

So, to get around this issue we had to either:

- Disable {{aws2-sqs}} consumers via *camel.health.exclude-pattern*

- Populate both component configuration options:
  *camel.component.aws2-sqs.region*
  *camel.component.aws2-sqs.useDefaultCredentialsProvider*

We feel that that the latter option presents an unnecessary amount of friction 
at the component configuration level when an already-realised AWS {{SqsClient}} 
has been configured within a consumer and would like to explore ways to 
simplify HealthCheck configuration under this scenario.

> camel-health - Add health checks for components that has extension for 
> connectivity verification
> ------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-18131
>                 URL: https://issues.apache.org/jira/browse/CAMEL-18131
>             Project: Camel
>          Issue Type: New Feature
>            Reporter: Claus Ibsen
>            Assignee: Rhuan Rocha
>            Priority: Major
>             Fix For: 3.20.0
>
>
> A number of components have the old component extension verification (see 
> aws-s3) - we can migrate that into health-checks.
>  
> *Components to update (partial table):*
> |Component|Done|
> |AWS2-S3|x|
> |AWS2-ATHENA|x|
> |AWS2-EKS|x|
> |AWS2-CW| |
> |AWS2-DDB| |
> |AWS2-EC2| |
> |AWS2-EVENTBRIDGE| |
> |AWS2-IAM| |
> |AWS2-KINESIS|x|



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to