siddhicircuit-breaker

Is there a circuit breaker extension for wso2 siddhi applications?


I was looking for a circuit breaker configuration or a circuit breaker extension to detect failures in my siddhi application, but I was not able to find anything. Maybe I should implement my own custom circuit breaker pattern?


Solution

  • By default, Siddhi publishes in a non-blocking way. Hence, the threads within Siddhi will not be blocked unless you configure it to back-pressure using Siddhi Error handling. If a connection fails, Siddhi will automatically retry in a back-off retry mechanism.

    You can use the Siddhi Error handling to have a handle on the the errors manually. With error handling at Sink, you can handle the error cases using 3 approaches.

    1. Log and drop the event
    2. Publishing threads wait in back-off and re-trying mode
    3. Push the failed events to a dedicated stream and use the events thereafter as per your requirement.

    I also believe, it will be more convenient for the users, if this support is provided natively. Hence, I created an issue to raise a feature request.