private MessageProducerNode producerNode(String name, MessageProducerSupport producer) { String errorChannel = producer.getErrorChannel() != null ? producer.getErrorChannel().toString() : null; String outputChannel = producer.getOutputChannel() != null ? producer.getOutputChannel().toString() : null; return new MessageProducerNode(this.nodeId.incrementAndGet(), name, producer, outputChannel, errorChannel); }
/** * 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; }
private MessageProducerNode producerNode(String name, MessageProducerSupport producer) { String errorChannel = producer.getErrorChannel() != null ? producer.getErrorChannel().toString() : null; String outputChannel = producer.getOutputChannel() != null ? producer.getOutputChannel().toString() : null; return new MessageProducerNode(this.nodeId.incrementAndGet(), name, producer, outputChannel, errorChannel); }
/** * 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; }