This post is meant to be a quick introduction to this new feature so you can start testing it out.
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.
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.
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.
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.