本文整理了Java中org.apache.activemq.artemis.api.core.Message.setDurable()
方法的一些代码示例,展示了Message.setDurable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.setDurable()
方法的具体详情如下:
包路径:org.apache.activemq.artemis.api.core.Message
类名称:Message
方法名:setDurable
[英]Sets whether this message is durable or not.
[中]
代码示例来源:origin: apache/activemq-artemis
msg.setDurable(Boolean.parseBoolean(persistent));
代码示例来源:origin: org.apache.activemq/artemis-stomp-protocol
msg.setDurable(Boolean.parseBoolean(persistent));
代码示例来源:origin: apache/activemq-artemis
@Test
public void testAMQDurable() throws Exception {
filter = FilterImpl.createFilter(new SimpleString("AMQDurable='DURABLE'"));
message.setDurable(true);
Assert.assertTrue(filter.match(message));
message.setDurable(false);
Assert.assertFalse(filter.match(message));
filter = FilterImpl.createFilter(new SimpleString("AMQDurable='NON_DURABLE'"));
message = new CoreMessage();
message.setDurable(true);
Assert.assertFalse(filter.match(message));
message.setDurable(false);
Assert.assertTrue(filter.match(message));
}
代码示例来源:origin: apache/activemq-artemis
serverMessage.setDurable(MQTTUtil.DURABLE_MESSAGES);
代码示例来源:origin: org.apache.activemq/artemis-mqtt-protocol
serverMessage.setDurable(MQTTUtil.DURABLE_MESSAGES);
代码示例来源:origin: apache/activemq-artemis
notificationMessage.setDurable(true);
notificationMessage.setAddress(managementNotificationAddress);
内容来源于网络,如有侵权,请联系作者删除!