camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yves De Moor (JIRA)" <>
Subject [jira] [Commented] (CAMEL-5539) Circuit Breaker EIP
Date Mon, 27 Oct 2014 14:47:35 GMT


Yves De Moor commented on CAMEL-5539:

Simple, quick and most flexible solution could be :

Put the number of failure in an exchange property.
Put circuit state in an exchange property (2 status : Open / closed, as halfOpen do the same
as closed in term of business)
use a Content Based Router to perform something like

            .circuitBreaker(3, 3000L, MyCustomException.class)

                .when(property(Exchange.CircuitBreaker_errorCount).isEqualTo("1")) //First
error encountered, send an alert to monitoring

I also see the current solution is not enough robust. 
when halfOpen is reached, (System.currentTimeMillis() - lastFailure < halfOpenAfter) there
is no restriction on the number of calls (threads) that will perform a retry.

When retry timeout is reached, we should let only 1 thread go in "halfOpen" mode, all other
should be kept in "open" state until an halfOpen succeed.
(will create new issue for this)


> Circuit Breaker EIP
> -------------------
>                 Key: CAMEL-5539
>                 URL:
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core, eip
>            Reporter: Claus Ibsen
>            Assignee: Raúl Kripalani
>             Fix For: Future
>         Attachments: CAMEL-5539-output-82ef800.txt, CAMEL-5539-output.txt
> Look at add the circuit breaker EIP to the Camel DSL.
> Would need some thoughts for that though. Either as an explicit in the DSL. Or as a interceptor
for sending to an endpoint. As explicit its a kind to the load balancer (in fact it may be
extended upon that). Either the LB selects the intended target, or it select the breaker,
which rejects executing the message.

This message was sent by Atlassian JIRA

View raw message