The Integration blog covers the latest in product updates, best practices, customer stories, and more.

  • January 21, 2016

Resiliency: Circuit Breaker

Circuit Breaker is a new resiliency feature in 12.2.1 that
helps to simplify operations and ensure system stability when downstream
endpoints become unavailable.

This post is meant to be a quick introduction to this new feature so you can start testing it out.

Circuit Breaker overview

Circuit Breaker enables you to configure the system to automatically suspend upstream endpoints when a downstream system is down or unreachable from a SOA composite. This prevents faults from building up in the server and relieves you from having to bulk-recover faulted instances. The upstream endpoints are automatically resumed after the downstream endpoint comes back up.

The circuit breaker feature works by monitoring downstream system failures and after x number of failures over y minutes (where x and y are configurable) any upstream web service, subscriber, or adapter where the failed messages originated from will be suspended.  For adapters and subscribers the messages will not be lost but will not be processed until the downstream system comes back up. Web Service requests will be rejected and it is up to the client program to handle these failures.

Suspended services will show up in the EM dashboard (below),  by clicking on the "Suspended since ..." link another dialog will pop up that will allow you to jump to the error in the Error Hospital and/or re-enable the service. 

Once a service is suspended messages are allowed to "trickle" through periodically in order to test the downstream system.  If the downstream invocation succeeds then the upstream service is resumed.


Circuit Breaker can be configured globally and overridden at the downstream endpoint. There may be situations where you don't want downstream failures to cause services to be suspended, in this case you would disable the circuit breaker at the endpoint level, it is also possible to override the number of failures and failure window at the endpoint level. Conversely you can disable globally and enable at the endpoint level.  It is also possible to set the circuit breaker properties on an endpoint when designing the composite in JDev.

Global configuration

 To display the configuration dialog go to SOA Infrastructure -> SOA Administration -> Resiliency Configuration

By default circuit breaker is disabled,  check the Enabled box and adjust the parameters as needed.
Failure Rate defines the number of failures in a given time period (in minutes), once this threshold is met the upstream services are suspended.
The Retry Interval defines how often to allow retry messages to trickle through.
The "Add Notifications" button will allow you to configure where notifications will be sent,  notifications are sent when a service gets suspended and resumed.
Notifications can be sent via Email, SMS, and IM.
The "More Resiliency Configurations Properties..." link will take you to the MBean browser where you can navigate to the "ResiliencyConfig" MBean.
   - here is where you can configure the ramp-up rate for when a service gets resumed.  This allows messages to be throttled when resuming a service so other composites/flows don't get starved.

Endpoint configuration

Global settings can be overridden at the endpoint level.
Navigate to the reference properties tab in EM, click on the Add button and then filter on "circuitbreaker".
These properties will take precedence over the global properties. 

JDev configuration

 It is also possible to configure the circuit breaker properties when designing the composite with JDev.
To set the properties in JDev, select the reference and then under composite properties click on the under Binding Properties, you can then add the properties you are interested in.


I hope this gives you enough information to get started so you can start testing this feature out,  for more detailed information you can refer to the online docs.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.