本文整理了Java中org.apache.activemq.artemis.api.core.Message.getLongProperty()
方法的一些代码示例,展示了Message.getLongProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.getLongProperty()
方法的具体详情如下:
包路径:org.apache.activemq.artemis.api.core.Message
类名称:Message
方法名:getLongProperty
暂无
代码示例来源:origin: apache/activemq-artemis
public static long getLongProperty(final Message message, final String name) {
if (MessageUtil.JMSXGROUPSEQ.equals(name)) {
return message.getGroupSequence();
} else {
return message.getLongProperty(name);
}
}
代码示例来源:origin: apache/activemq-artemis
public static long getLongProperty(final Message message, final String name) {
if (MessageUtil.JMSXGROUPSEQ.equals(name)) {
return message.getGroupSequence();
} else {
return message.getLongProperty(name);
}
}
代码示例来源:origin: apache/activemq-artemis
public static long getLongProperty(final Message message, final String name) {
if (MessageUtil.JMSXGROUPSEQ.equals(name)) {
return message.getGroupSequence();
} else {
return message.getLongProperty(name);
}
}
代码示例来源:origin: apache/activemq-artemis
@Override
public void encode(ActiveMQBuffer buffer, Message record) {
used = true;
try {
Long delay = record.getLongProperty("delay");
if (delay == null || delay.longValue() <= 0) {
logger.infof("encode message %d, caller=%s", record.getMessageID(), Thread.currentThread().getName());
} else {
logger.infof("sleep %d ms before encode message %d, caller=%s", delay.longValue(), record.getMessageID(), Thread.currentThread().getName());
Thread.sleep(delay.longValue());
}
} catch (InterruptedException e) {
// it's ok
}
persister.encode(buffer, record);
}
内容来源于网络,如有侵权,请联系作者删除!