/** * Send an error message based on the exception and message. * @param message the message. * @param exception the exception. * @return true if the error channel is available and message sent. * @since 4.3.10 */ protected final boolean sendErrorMessageIfNecessary(Message<?> message, RuntimeException exception) { MessageChannel channel = getErrorChannel(); if (channel != null) { this.messagingTemplate.send(channel, buildErrorMessage(message, exception)); return true; } return false; }
/** * Send an error message based on the exception and message. * @param message the message. * @param exception the exception. * @return true if the error channel is available and message sent. * @since 4.3.10 */ protected final boolean sendErrorMessageIfNecessary(Message<?> message, RuntimeException exception) { MessageChannel channel = getErrorChannel(); if (channel != null) { this.messagingTemplate.send(channel, buildErrorMessage(message, exception)); return true; } return false; }