12
Views
3
Comments
[Circuit Breaker] Implementing Circuit Breaker Pattern when there is end point authentication
Question
Forge component by Carlos Sousa
0
Published on 26 May 2020

Hi,

How does the Circuit Breaker component work when there is End point Authentication as I see that there is no way I can pass Authentication to End point URL input parameter to Circuit Breaker public methods.

Hi Ravi,

I don't know if I understood your doubt clearly, but the goal of this component is not to be a wrapper when you call an API.  This component is just a set of actions that you use around your calls to APIs in your modules, as in this screenshot:

The EndpointKey input is just a key to associate to a JSON value. The authentication here or any other API characteristic is not relevant.


Hope it helps. Cheers,

António Pereira

Rank: #258

Hi Antonio,

Thank you for your reply. 

If Endpointkey input is just a key, then how will the circuit breaker decide when to close the circuit again after it is open ? 

Thanks

Ravi

Staff
Rank: #251

Essentially the circuit breaker logic checks temporarily closes the circuit periodically to check if the API is already working.

These mechanism ensures that the circuit breaker won't open forever.

Carlos