Trading Networks 10.3 | Administering and Monitoring B2B Transactions | Service Development Help | Properties | Service Properties | Circuit Breaker Properties
 
Circuit Breaker Properties
You can configure a circuit breaker to act as a proxy for executing the service. A circuit breaker can detect errors or inordinately long execution times for a service and prevent execution of the failing or slow service by subsequent service calls.
In the Properties view, under Circuit Breaker, you enable the circuit breaker and configure its behavior.
Note:
The circuit breaker feature is available by default for a service that resides on a webMethods Microservices Runtime. To use the circuit breaker feature with Integration Server, your Integration Server must have additional licensing.
Property
Description
Enabled
Specifies whether a circuit breaker is used with the service.
Specify...
To...
True
Enable a circuit breaker for the service.
False
Disable a circuit breaker for the service.
This is the default.
Failure event
Specifies what constitutes a failure event. Specify one of the following
Specify...
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.
Timeout period
Specifies 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 if you set the Failure Event property to Timeout or Exception or timeout. If you set Failure event to Exception, the Timeout period property is display only.
Whether or not the circuit breaker attempts to end service execution when the execution time meets or exceeds the timeout period depends on the value of the Cancel thread on timeout period property.
Cancel thread on Timeout
Specifies 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.
For circuit breaker to cancel a thread, the watt.server.threadKill.enabled property must be set to true.
If you want circuit breaker to attempt to interrupt a service thread in addition to attempting to cancel it, the watt.server.threadKill.interruptThread.enabled property must be set to true.
Use care when configuring a circuit breaker to cancel threads. Canceling a thread might not free up resources being held by the service. For more information about canceling threads, see the webMethods Integration Server Administrator’s Guide.
Specify...
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.
Failure threshold
The number of failure events occurring within the failure period that cause the circuit to open.
The default is 5.
If circuit breaker is enabled for the service, you must specify a value greater than 0.
Failure period
Time period, measured in seconds, during which the number of failure events meeting or exceeding the failure threshold causes the circuit breaker to open the circuit.
The default is 60 seconds.
Circuit open action
Action the circuit breaker takes when receiving requests to invoke the service when the circuit is open.
Specify...
To...
Throw exception
Indicate that circuit breaker throws the exception that caused the circuit to open
This is the default.
Invoke service
Indicate that circuit breaker invokes the service specified in the Circuit open service property.
Circuit open service
Fully qualified name of the service that circuit breaker invokes when receiving requests for this service when the circuit is open. This property applies only if the Circuit open action property is set to Invoke service.
The Circuit open service property is display-only if the Circuit open action property is set to Throw exception.
Circuit reset period
Length of time, measured in seconds, for which the circuit remains in an open state once it is opened. 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.
The default is 300 seconds.