@Override public void setJMSDestination(Destination destination) throws JMSException { this.setDestination(ActiveMQDestination.transform(destination)); }
protected void dispatchInitialMessage(Message message, Destination regionDestination, ConnectionContext context, SubscriptionRecovery sub) { try { ActiveMQMessage activeMessage = ActiveMQMessageTransformation.transformMessage(message, null); ActiveMQDestination destination = activeMessage.getDestination(); if (destination == null) { destination = sub.getActiveMQDestination(); activeMessage.setDestination(destination); } activeMessage.setRegionDestination(regionDestination); configure(activeMessage); sub.addRecoveredMessage(context, activeMessage); } catch (Throwable e) { LOG.warn("Failed to dispatch initial message: {} into subscription. Reason: ", message, e); } }
msg.setDestination(destination); msg.setMessageId(new MessageId(producer.getProducerInfo().getProducerId(), sequenceNumber));
advisoryMessage.setMessageId(new MessageId(advisoryProducerId, messageIdGenerator.getNextSequenceId())); advisoryMessage.setTargetConsumerId(targetConsumerId); advisoryMessage.setDestination(topic); advisoryMessage.setResponseRequired(false); advisoryMessage.setProducerId(advisoryProducerId);
protected void inject(MessageRouter messageRouter, ActiveMQMessage message) throws Exception { if (message != null) { message.setDestination(destination); messageRouter.inject(message); } } }
@Override public void setJMSDestination(Destination destination) throws JMSException { this.setDestination(ActiveMQDestination.transform(destination)); }
@Override public void setJMSDestination(Destination destination) throws JMSException { this.setDestination(ActiveMQDestination.transform(destination)); }
public void setJMSDestination(Destination destination) throws JMSException { this.setDestination(ActiveMQDestination.transform(destination)); }
@Override public void setJMSDestination(Destination destination) throws JMSException { this.setDestination(ActiveMQDestination.transform(destination)); }
protected void dispatchInitialMessage(Message message, Destination regionDestination, ConnectionContext context, SubscriptionRecovery sub) { try { ActiveMQMessage activeMessage = ActiveMQMessageTransformation.transformMessage(message, null); ActiveMQDestination destination = activeMessage.getDestination(); if (destination == null) { destination = sub.getActiveMQDestination(); activeMessage.setDestination(destination); } activeMessage.setRegionDestination(regionDestination); configure(activeMessage); sub.addRecoveredMessage(context, activeMessage); } catch (Throwable e) { LOG.warn("Failed to dispatch initial message: " + message + " into subscription. Reason: " + e, e); } }
protected void dispatchInitialMessage(Message message, Destination regionDestination, ConnectionContext context, SubscriptionRecovery sub) { try { ActiveMQMessage activeMessage = ActiveMQMessageTransformation.transformMessage(message, null); ActiveMQDestination destination = activeMessage.getDestination(); if (destination == null) { destination = sub.getActiveMQDestination(); activeMessage.setDestination(destination); } activeMessage.setRegionDestination(regionDestination); configure(activeMessage); sub.addRecoveredMessage(context, activeMessage); } catch (Throwable e) { LOG.warn("Failed to dispatch initial message: {} into subscription. Reason: ", message, e); } }
protected void dispatchInitialMessage(Message message, Destination regionDestination, ConnectionContext context, SubscriptionRecovery sub) { try { ActiveMQMessage activeMessage = ActiveMQMessageTransformation.transformMessage(message, null); ActiveMQDestination destination = activeMessage.getDestination(); if (destination == null) { destination = sub.getActiveMQDestination(); activeMessage.setDestination(destination); } activeMessage.setRegionDestination(regionDestination); configure(activeMessage); sub.addRecoveredMessage(context, activeMessage); } catch (Throwable e) { LOG.warn("Failed to dispatch initial message: {} into subscription. Reason: ", message, e); } }
protected void dispatchInitialMessage(Message message, Destination regionDestination, ConnectionContext context, SubscriptionRecovery sub) { try { ActiveMQMessage activeMessage = ActiveMQMessageTransformation.transformMessage(message, null); ActiveMQDestination destination = activeMessage.getDestination(); if (destination == null) { destination = sub.getActiveMQDestination(); activeMessage.setDestination(destination); } activeMessage.setRegionDestination(regionDestination); configure(activeMessage); sub.addRecoveredMessage(context, activeMessage); } catch (Throwable e) { LOG.warn("Failed to dispatch initial message: {} into subscription. Reason: ", message, e); } }
protected boolean processInOnly(final Exchange exchange, final AsyncCallback callback) { try { ActiveMQMessage message = getMessage(exchange); if (message != null) { MessageRouter messageRouter = getMessageRouter(exchange); if (messageRouter != null) { message.setDestination(controllerEndpoint.getDestination()); controllerEndpoint.inject(messageRouter, message); } else { LOG.error("Transport not set for " + exchange); } } } catch (Exception e) { exchange.setException(e); } callback.done(true); return true; }
protected void onMessage(Message message) throws Exception { if (LOG.isDebugEnabled()) { LOG.debug("Message from: " + message.getFrom() + " to: " + message.getTo() + " subjectOrBodyOrThread: " + message.getSubjectOrBodyOrThread()); } final ActiveMQMessage activeMQMessage = createActiveMQMessage(message); ActiveMQDestination destination = createActiveMQDestination(message.getTo()); activeMQMessage.setMessageId(new MessageId(producerInfo, messageIdGenerator.getNextSequenceId())); activeMQMessage.setDestination(destination); activeMQMessage.setProducerId(producerId); activeMQMessage.setTimestamp(System.currentTimeMillis()); addActiveMQMessageHeaders(activeMQMessage, message); /* * MessageDispatch dispatch = new MessageDispatch(); * dispatch.setDestination(destination); * dispatch.setMessage(activeMQMessage); */ if (LOG.isDebugEnabled()) { LOG.debug("Sending ActiveMQ message: " + activeMQMessage); } sendToActiveMQ(activeMQMessage, createErrorHandler("send message")); }
protected boolean processInOnly(final Exchange exchange, final AsyncCallback callback) { try { ActiveMQMessage message = getMessage(exchange); if (message != null) { message.setDestination(brokerEndpoint.getDestination()); //if the ProducerBrokerExchange is null the broker will create it ProducerBrokerExchange producerBrokerExchange = (ProducerBrokerExchange) exchange.getProperty(BrokerEndpoint.PRODUCER_BROKER_EXCHANGE); brokerEndpoint.inject(producerBrokerExchange, message); } } catch (Exception e) { exchange.setException(e); } callback.done(true); return true; }
protected boolean processInOnly(final Exchange exchange, final AsyncCallback callback) { try { ActiveMQMessage message = getMessage(exchange); if (message != null) { message.setDestination(brokerEndpoint.getDestination()); //if the ProducerBrokerExchange is null the broker will create it ProducerBrokerExchange producerBrokerExchange = (ProducerBrokerExchange) exchange.getProperty(BrokerEndpoint.PRODUCER_BROKER_EXCHANGE); brokerEndpoint.inject(producerBrokerExchange, message); } } catch (Exception e) { exchange.setException(e); } callback.done(true); return true; }
advisoryMessage.setMessageId(new MessageId(advisoryProducerId, messageIdGenerator.getNextSequenceId())); advisoryMessage.setTargetConsumerId(targetConsumerId); advisoryMessage.setDestination(topic); advisoryMessage.setResponseRequired(false); advisoryMessage.setProducerId(advisoryProducerId);
advisoryMessage.setMessageId(new MessageId(advisoryProducerId, messageIdGenerator.getNextSequenceId())); advisoryMessage.setTargetConsumerId(targetConsumerId); advisoryMessage.setDestination(topic); advisoryMessage.setResponseRequired(false); advisoryMessage.setProducerId(advisoryProducerId);
advisoryMessage.setMessageId(new MessageId(advisoryProducerId, messageIdGenerator.getNextSequenceId())); advisoryMessage.setTargetConsumerId(targetConsumerId); advisoryMessage.setDestination(topic); advisoryMessage.setResponseRequired(false); advisoryMessage.setProducerId(advisoryProducerId);