Class MQCircuitsManager
java.lang.Object
com.mulesoft.extension.mq.internal.source.MQCircuitsManager
Controls the creation and configuration of all the
MQCircuitBreaker present in a given application- Since:
- 2.1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.mulesoft.mq.restclient.circuit.MQCircuitBreakergetOrCreateCircuit(CircuitBreakerConfiguration circuitConfig, String fallbackName) Factory method to obtain aMQCircuitBreaker.
-
Constructor Details
-
MQCircuitsManager
public MQCircuitsManager()
-
-
Method Details
-
getOrCreateCircuit
public com.mulesoft.mq.restclient.circuit.MQCircuitBreaker getOrCreateCircuit(CircuitBreakerConfiguration circuitConfig, String fallbackName) Factory method to obtain aMQCircuitBreaker. All circuit breakers will be registered in this common manager, and identified by circuit name. When no circuit exists with the given name, a new one will be created and registered in this manager. If the circuit exists then the manager will return the existing instance, as long as the current and the expected configuration are the same. In the case that two circuits with the same name but different configurations are attempted to be created, anIllegalArgumentExceptionwill be thrown indicating that two circuits are in conflict.- Parameters:
circuitConfig- the desired configuration of the circuitfallbackName- the name to be used if the configuration does not provide one- Returns:
-