当前位置: 首页>>代码示例>>Java>>正文


Java ActiveMQMessage.getDestination方法代码示例

本文整理汇总了Java中org.apache.activemq.command.ActiveMQMessage.getDestination方法的典型用法代码示例。如果您正苦于以下问题:Java ActiveMQMessage.getDestination方法的具体用法?Java ActiveMQMessage.getDestination怎么用?Java ActiveMQMessage.getDestination使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.activemq.command.ActiveMQMessage的用法示例。


在下文中一共展示了ActiveMQMessage.getDestination方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createMessageDispatch

import org.apache.activemq.command.ActiveMQMessage; //导入方法依赖的package包/类
public MessageDispatch createMessageDispatch(MessageReference reference,
                                                    ICoreMessage message,
                                                    AMQConsumer consumer) throws IOException, JMSException {
   ActiveMQMessage amqMessage = toAMQMessage(reference, message, consumer.getOpenwireDestination());

   //we can use core message id for sequenceId
   amqMessage.getMessageId().setBrokerSequenceId(message.getMessageID());
   MessageDispatch md = new MessageDispatch();
   md.setConsumerId(consumer.getId());
   md.setRedeliveryCounter(reference.getDeliveryCount() - 1);
   md.setDeliverySequenceId(amqMessage.getMessageId().getBrokerSequenceId());
   md.setMessage(amqMessage);
   ActiveMQDestination destination = amqMessage.getDestination();
   md.setDestination(destination);

   return md;
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:18,代码来源:OpenWireMessageConverter.java

示例2: onMessageCreated

import org.apache.activemq.command.ActiveMQMessage; //导入方法依赖的package包/类
@Override
public void onMessageCreated(Message message, Session session, Exchange exchange, Throwable cause) {
    if (exchange.getIn() instanceof JmsMessage) {
        JmsMessage msg = exchange.getIn(JmsMessage.class);
        Message jms = msg.getJmsMessage();
        if (message instanceof ActiveMQMessage) {
            ActiveMQMessage amq = (ActiveMQMessage) jms;
            ActiveMQDestination from = amq.getDestination();

            if (from != null && message instanceof ActiveMQMessage) {
                ((ActiveMQMessage) message).setOriginalDestination(from);
            }
        }
    }
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:16,代码来源:ActiveMQOriginalDestinationTest.java

示例3: add

import org.apache.activemq.command.ActiveMQMessage; //导入方法依赖的package包/类
public void add(MessageReference node) {
    ActiveMQMessage message = (ActiveMQMessage) node.getMessageHardRef();
    ActiveMQDestination destination = message.getDestination();
    MessageQueue queue = null;
    synchronized (lock) {
        queue = queueIndex.get(destination);
        if (queue == null) {
            queue = messageBuffer.createMessageQueue();
            queueIndex.put(destination, queue);
            subscriptionIndex.put(destination, queue);
        }
    }
    queue.add(node);
}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:15,代码来源:DestinationBasedMessageList.java

示例4: dispatchInitialMessage

import org.apache.activemq.command.ActiveMQMessage; //导入方法依赖的package包/类
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);
    }
}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:16,代码来源:QueryBasedSubscriptionRecoveryPolicy.java


注:本文中的org.apache.activemq.command.ActiveMQMessage.getDestination方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。