/** * Handle the given exception that arose during listener execution. * <p> * The default implementation logs the exception at error level. This can be overridden in subclasses. * * @param ex the exception to handle */ protected void handleListenerException(Throwable ex) { if (isActive()) { // Regular case: failed while active. // Invoke ErrorHandler if available. invokeErrorHandler(ex); } else { // Rare case: listener thread failed after container shutdown. // Log at debug level, to avoid spamming the shutdown logger. logger.debug("Listener exception after container shutdown", ex); } }
/** * Handle the given exception that arose during listener execution. * <p> * The default implementation logs the exception at error level. This can be overridden in subclasses. * * @param ex the exception to handle */ protected void handleListenerException(Throwable ex) { if (isActive()) { // Regular case: failed while active. // Invoke ErrorHandler if available. invokeErrorHandler(ex); } else { // Rare case: listener thread failed after container shutdown. // Log at debug level, to avoid spamming the shutdown logger. logger.debug("Listener exception after container shutdown", ex); } }
/** * Handle the given exception that arose during listener execution. * <p> * The default implementation logs the exception at error level. This can be overridden in subclasses. * * @param ex the exception to handle */ protected void handleListenerException(Throwable ex) { if (isActive()) { // Regular case: failed while active. // Invoke ErrorHandler if available. invokeErrorHandler(ex); } else { // Rare case: listener thread failed after container shutdown. // Log at debug level, to avoid spamming the shutdown logger. logger.debug("Listener exception after container shutdown", ex); } }
@Override public void start() { if (listenerContainer.isActive() && listenerContainer.isRunning()) { processName = getProcessName(); monitorListener = this; monitorTopic = new ChannelTopic(buildMonitorChannelName(processName)); if (subscribeMonitor()) { running = true; LOGGER.info("RedisSubscriptionMonitor started for process {}", processName); } } }