public JmsBinding getBinding() { if (binding == null) { binding = endpoint.getBinding(); } return binding; }
@Override public Exchange createExchange(ExchangePattern pattern) { Exchange exchange = super.createExchange(pattern); exchange.setProperty(Exchange.BINDING, getBinding()); return exchange; }
public Message createMessage(Session session) throws JMSException { Message reply = endpoint.getBinding().makeJmsMessage(exchange, out, session, cause); final String correlationID = determineCorrelationId(message); reply.setJMSCorrelationID(correlationID); if (LOG.isDebugEnabled()) { LOG.debug("{} sending reply JMS message [correlationId:{}]: {}", endpoint, correlationID, reply); } return reply; } });
public Message createMessage(Session session) throws JMSException { Message reply = endpoint.getBinding().makeJmsMessage(exchange, out, session, cause); final String correlationID = determineCorrelationId(message); reply.setJMSCorrelationID(correlationID); if (LOG.isDebugEnabled()) { LOG.debug("{} sending reply JMS message [correlationId:{}]: {}", endpoint, correlationID, reply); } return reply; } });
public Exchange createExchange(Message message, Session session) { Exchange exchange = createExchange(getExchangePattern()); exchange.setIn(new JmsMessage(message, session, getBinding())); return exchange; }
public Message createMessage(Session session) throws JMSException { Message answer = endpoint.getBinding().makeJmsMessage(exchange, in, session, null);
public Message createMessage(Session session) throws JMSException { Message answer = endpoint.getBinding().makeJmsMessage(exchange, in, session, null); Destination replyTo = null; String replyToOverride = configuration.getReplyToOverride(); if (replyToOverride != null) { replyTo = resolveOrCreateDestination(replyToOverride, session); } else { // get the reply to destination to be used from the reply manager replyTo = replyManager.getReplyTo(); } if (replyTo == null) { throw new RuntimeExchangeException("Failed to resolve replyTo destination", exchange); } JmsMessageHelper.setJMSReplyTo(answer, replyTo); replyManager.setReplyToSelectorHeader(in, answer); String correlationId = determineCorrelationId(answer, provisionalCorrelationId); replyManager.registerReply(replyManager, exchange, callback, originalCorrelationId, correlationId, timeout); if (correlationProperty != null) { replyManager.setCorrelationProperty(correlationProperty); } if (LOG.isDebugEnabled()) { LOG.debug("Using {}: {}, JMSReplyTo destination: {}, with request timeout: {} ms.", new Object[]{correlationPropertyToUse, correlationId, replyTo, timeout}); } LOG.trace("Created javax.jms.Message: {}", answer); return answer; } };
protected void createMessageListener(JmsEndpoint endpoint, Processor processor) { messageListener = new EndpointMessageListener(endpoint, processor); getEndpoint().getConfiguration().configureMessageListener(messageListener); messageListener.setBinding(endpoint.getBinding()); messageListener.setAsync(endpoint.getConfiguration().isAsyncConsumer()); }
Message message = holder.getMessage(); Session session = holder.getSession(); JmsMessage response = new JmsMessage(message, session, endpoint.getBinding());