shashank created CAMEL-26419:
--------------------------------
Summary: camel-azure-cosmosdb - a health check for a change feed
consumer that has not started its processor yet
Key: CAMEL-26419
URL: https://issues.apache.org/jira/browse/CAMEL-26419
Project: Camel
Issue Type: Improvement
Components: camel-azure
Reporter: shashank
Assignee: shashank
Follow-up of CAMEL-25861 (apache/camel#28637), asked for in its review.
Since CAMEL-25861 the cosmosdb consumer starts the change feed processor again
(with backoff) until it starts or the consumer stops, when Cosmos DB is not
reachable yet, the lease container does not exist or a role assignment has not
propagated. During that time the route and the consumer report {{Started}}
while no change is received, and the only signal is a WARN line per attempt
(the first failure goes to the consumer's {{ExceptionHandler}}).
Proposal:
* a readiness health check for the cosmosdb consumer that is DOWN (with the
last start failure and the attempt count) until the change feed processor has
started, and UP after;
* optionally an option to cap the start attempts, after which the consumer
fails (for example with {{bridgeErrorHandler}} or a route that should not stay
up), as discussed in the review of #28637. The default stays unbounded, as
today.
Tests: the existing mocked change feed processor
({{CosmosDbConsumerFirstStartFailsTest}}) with the health check registry: DOWN
while the start fails, UP once it starts, and back to the initial state after a
stop.
_Filed with Claude Code on behalf of allthingssecurity._
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)