Class MQCircuitsManager

java.lang.Object
com.mulesoft.extension.mq.internal.source.MQCircuitsManager

public class MQCircuitsManager extends Object
Controls the creation and configuration of all the MQCircuitBreaker present in a given application
Since:
2.1.0
  • Constructor Details

    • MQCircuitsManager

      public MQCircuitsManager()
  • Method Details

    • getOrCreateCircuit

      public com.mulesoft.mq.restclient.circuit.MQCircuitBreaker getOrCreateCircuit(CircuitBreakerConfiguration circuitConfig, String fallbackName)
      Factory method to obtain a MQCircuitBreaker. 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, an IllegalArgumentException will be thrown indicating that two circuits are in conflict.
      Parameters:
      circuitConfig - the desired configuration of the circuit
      fallbackName - the name to be used if the configuration does not provide one
      Returns: