Examples of MessageDeliveryException


Examples of org.springframework.integration.message.MessageDeliveryException

            if (replyChannel == null) {
                MessageChannel messageReplyChannel = (MessageChannel) message.getHeaders().get(MessageHeaders.REPLY_CHANNEL);
                if (messageReplyChannel != null) {
                    result = messageReplyChannel.send(response);
                } else {
                    throw new MessageDeliveryException(response, "Cannot resolve ReplyChannel from message: " + message);
                }
            } else {
                result = replyChannel.send(response);
            }
        }
View Full Code Here

Examples of org.springframework.integration.message.MessageDeliveryException

    public void handleMessage(Message<?> message) throws MessageDeliveryException {
        try {
            send(message);
        } catch (Exception e) {
            throw new MessageDeliveryException(message, "Cannot send message", e);
        }
    }
View Full Code Here

Examples of org.springframework.integration.message.MessageDeliveryException

            if (replyChannel == null) {
                MessageChannel messageReplyChannel = (MessageChannel) message.getHeaders().get(MessageHeaders.REPLY_CHANNEL);
                if (messageReplyChannel != null) {
                    result = messageReplyChannel.send(response);
                } else {
                    throw new MessageDeliveryException(response, "Can't find reply channel from the CamelTargetAdapter or MessageHeaders");
                }
            } else {
                result = replyChannel.send(response);
            }
        }
View Full Code Here

Examples of org.springframework.integration.message.MessageDeliveryException

            if (replyChannel == null) {
                MessageChannel messageReplyChannel = (MessageChannel) message.getHeaders().get(MessageHeaders.REPLY_CHANNEL);
                if (messageReplyChannel != null) {
                    result = messageReplyChannel.send(response);
                } else {
                    throw new MessageDeliveryException(response, "Can't find reply channel from the CamelTargetAdapter or MessageHeaders");
                }
            } else {
                result = replyChannel.send(response);
            }
        }
View Full Code Here

Examples of org.springframework.integration.message.MessageDeliveryException

            if (replyChannel == null) {
                MessageChannel messageReplyChannel = (MessageChannel) message.getHeaders().get(MessageHeaders.REPLY_CHANNEL);
                if (messageReplyChannel != null) {
                    result = messageReplyChannel.send(response);
                } else {
                    throw new MessageDeliveryException(response, "Can't find reply channel from the CamelTargetAdapter or MessageHeaders");
                }
            } else {
                result = replyChannel.send(response);
            }
        }
View Full Code Here

Examples of org.springframework.messaging.MessageDeliveryException

    if (channel instanceof MessageChannel) {
      this.messagingTemplate.send((MessageChannel) channel, message);
    } else if (channel instanceof String) {
      this.messagingTemplate.send((String) channel, message);
    } else {
      throw new MessageDeliveryException(message,
          "a non-null reply channel value of type MessageChannel or String is required");
    }
  }
View Full Code Here

Examples of org.springframework.messaging.MessageDeliveryException

    long timeout = this.sendTimeout;
    boolean sent = (timeout >= 0 ? channel.send(message, timeout) : channel.send(message));

    if (!sent) {
      throw new MessageDeliveryException(message,
          "failed to send message to channel '" + channel + "' within timeout: " + timeout);
    }
  }
View Full Code Here

Examples of org.springframework.messaging.MessageDeliveryException

    long timeout = this.sendTimeout;
    boolean sent = (timeout >= 0 ? this.messageChannel.send(message, timeout) : this.messageChannel.send(message));

    if (!sent) {
      throw new MessageDeliveryException(message,
          "Failed to send message to destination '" + destination + "' within timeout: " + timeout);
    }
  }
View Full Code Here

Examples of org.springframework.messaging.MessageDeliveryException

      if (errorDescription != null) {
        if (logger.isWarnEnabled()) {
          logger.warn(errorDescription + ":" + message);
        }
        if (GenericMessagingTemplate.this.throwExceptionOnLateReply) {
          throw new MessageDeliveryException(message, errorDescription);
        }
      }

      return true;
    }
View Full Code Here

Examples of org.springframework.messaging.MessageDeliveryException

  protected void handleMessageInternal(Message<?> message) {
    String sessionId = SimpMessageHeaderAccessor.getSessionId(message.getHeaders());

    if (!isBrokerAvailable()) {
      if (sessionId == null || SYSTEM_SESSION_ID.equals(sessionId)) {
        throw new MessageDeliveryException("Message broker not active. Consider subscribing to " +
            "receive BrokerAvailabilityEvent's from an ApplicationListener Spring bean.");
      }
      SimpMessageType messageType = SimpMessageHeaderAccessor.getMessageType(message.getHeaders());
      if (logger.isErrorEnabled() && SimpMessageType.CONNECT.equals(messageType)) {
        logger.error("Broker not active. Ignoring " + message);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.