@Override protected boolean doSend(Message<?> message, long timeout) { try { return getRequiredDispatcher().dispatch(message); } catch (MessageDispatchingException e) { String description = e.getMessage() + " for channel '" + this.getFullChannelName() + "'."; throw new MessageDeliveryException(message, description, e); } }
@Override public void onMessage(org.springframework.amqp.core.Message message) { Message<?> messageToSend = null; try { Object converted = this.converter.fromMessage(message); messageToSend = (converted instanceof Message<?>) ? (Message<?>) converted : buildMessage(message, converted); this.dispatcher.dispatch(messageToSend); } catch (MessageDispatchingException e) { String exceptionMessage = e.getMessage() + " for amqp-channel '" + this.channel.getFullChannelName() + "'."; if (this.isPubSub) { // log only for backwards compatibility with pub/sub if (this.logger.isWarnEnabled()) { this.logger.warn(exceptionMessage, e); } } else { throw new MessageDeliveryException(messageToSend, exceptionMessage, e); } } }
messageToSend = (converted instanceof Message<?>) ? (Message<?>) converted : this.messageBuilderFactory.withPayload(converted).build(); this.dispatcher.dispatch(messageToSend);
@Override protected boolean doSend(Message<?> message, long timeout) { return this.getRequiredDispatcher().dispatch(message); }
@Override protected boolean doSend(Message<?> message, long timeout) { try { return getRequiredDispatcher().dispatch(message); } catch (MessageDispatchingException e) { String description = e.getMessage() + " for channel '" + this.getFullChannelName() + "'."; throw new MessageDeliveryException(message, description, e); } }
@Override public void onMessage(org.springframework.amqp.core.Message message) { Message<?> messageToSend = null; try { Object converted = this.converter.fromMessage(message); messageToSend = (converted instanceof Message<?>) ? (Message<?>) converted : buildMessage(message, converted); this.dispatcher.dispatch(messageToSend); } catch (MessageDispatchingException e) { String exceptionMessage = e.getMessage() + " for amqp-channel '" + this.channel.getFullChannelName() + "'."; if (this.isPubSub) { // log only for backwards compatibility with pub/sub if (this.logger.isWarnEnabled()) { this.logger.warn(exceptionMessage, e); } } else { throw new MessageDeliveryException(messageToSend, exceptionMessage, e); } } }
messageToSend = (converted instanceof Message<?>) ? (Message<?>) converted : this.messageBuilderFactory.withPayload(converted).build(); this.dispatcher.dispatch(messageToSend);