DevOps Edition for Continuous Integration 10.5 | Service Development Help | Building Services | Using a Circuit Breaker with a Service | Configuring a Circuit Breaker for a Service
 
Configuring a Circuit Breaker for a Service
Before you configure a circuit breaker for a service make sure you understand how circuit breaker works in Integration Server and review the guidelines in Considerations for Configuring a Circuit Breaker for a Service
* To configure a circuit breaker for a service
1. In Package Navigator, open the service for which you want to configure a circuit breaker.
2. In the Circuit Breaker category of the Properties view, next to Enabled, specify one of the following:
Specify...
To...
True
Enable a circuit breaker for this service.
False
Disable a circuit breaker for this service. This is the default.
3. In the Failure event field, specify the events that the circuit breaker considers to be a failure event,
Select...
To...
Exception only
Indicate that a failure event occurs only when the service ends with an exception.
This is the default.
Timeout only
Indicate that a failure event occurs only when the service execution time exceeds the Timeout period property value.
Exception or Timeout
Indicate that a failure event occurs when the service ends with an exception or the service execution time exceeds the Timeout period property.
4. If the circuit breaker treats a timeout as a failure event, configure the following information:
For this property...
Specify...
Timeout period
The number of seconds that service execution can take before being considered a timeout failure event. If the timeout period elapses before service execution completes, the circuit breaker considers a timeout failure event to have occurred. The default is 60 seconds.
You must specify a timeout period greater than 0.
Cancel thread on timeout
Whether the circuit breaker gracefully attempts to cancel the thread executing the service when the timeout period elapses causing the timeout failure event. Canceling a thread can free up resources held by the thread.
Select...
To...
True
Indicate that circuit breaker attempts to cancel the thread executing the service if the timeout period elapses before the service execution completes.
False
Indicate that circuit breaker does not attempt to cancel the service execution thread if the timeout period elapses before service execution completes.
This is the default.
5. In the Failure threshold field, specify the number of failure events that cause the circuit to open if all the events occur within the failure period. The default is 5.
6. In the Failure period field, specify the length of time, measured in seconds, during which the number of failure events equal to the failure threshold causes the circuit to open. The default is 60 seconds.
7. In the Circuit open action field, specify how circuit breaker responds to a request for this service when the circuit is open.
Select...
To...
Throw exception
Indicate that circuit breaker responds to a service request by throwing the exception that caused the circuit to open.
This is the default.
Invoke service
Indicate that circuit breaker responds to a service request by executing the alternate service specified in the Circuit open service property.
8. If you set the Circuit open action field to Invoke service, in the Circuit open service field, specify the fully qualified name of the alternate service that circuit breaker invokes upon receiving a request when the circuit is open. For more information about building a service for use with an open circuit, see Developing Microservices with webMethods Microservices Runtime.
9. In the Circuit reset period field, specify the length of time, measured in seconds, for which the circuit remains in an open state. The default is 300 seconds.
During the reset period, the circuit breaker responds to requests to invoke the service as specified by the Circuit open action property. When the reset period elapses, the circuit breaker places the circuit in a half-open state. The next request for the service results in service execution, after which the circuit breaker either closes or re-opens the circuit.
10. Click File > Save.

Copyright © 2017-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.