mulemulesoftmule4circuit-breakeranypoint-mq

Mule 4 anypoint mq subscriber - circuit breaker any way to print in logs to indicate circuit breaker activated and messages will not be processed?


This followup question is to this one asked earlier:

Now Circuit breaker is working thanks to the answers on earlier question .

Now as a followup - is there a way that we could print in logs whenever the circuit breaker has got activated and will not process messages for specified time ( triptimeout ) ?

This will be quite useful in production environments to understand why processing has stopped ... ( This would prevent false alarms )

Note - enabling debug logs is not an option since we will not be enabling DEBUG level in production


Solution

  • At this time there is no special mechanism for tracking the circuit breaker execution. You could enable DEBUG logs in package com.mulesoft.extension.mq to identify useful logger message then restrict the logging to only specific classes with the messages you are interested. But probably you will get additional noise you may not be interested in. You will have to try to see if it is useful for you.