Hi, 

I have a question about the Circuit Breaker's behaviour, specifically how 
the callTimeout parameter interacts with failures being counted

It seems that the Circuit Breaker doesn't register a failure until the call 
is completed, rather than when the call takes longer than the callTimeout 
duration. I'm wondering if this is the intended behaviour.

     val breaker =
        new CircuitBreaker(context.system.scheduler,
          maxFailures = 1,
          callTimeout = 1.seconds,
          resetTimeout = 10.seconds).onOpen(log.debug("onOpen"))

      breaker.withCircuitBreaker(
          Future {
            Thread.sleep(10000) //10 seconds
          }
        )

In the code above, the Circuit Breaker won't register a failure, and 
transition to the open state, until the call is finished(10 seconds), 
rather than when the call surpasses the callTimeout duration(1 second). I'm 
wondering if this is the intended behaviour, as I assumed that it would 
register a failure as soon as the call surpasses the callTimeout duration.

-Will

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to