activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Bertram <>
Subject Re: Artemis MQTT durable messages and Topics
Date Tue, 21 Feb 2017 17:59:45 GMT
FWIW, if a queue isn't marked as durable then it doesn't matter if a message on that is durable
as it will be lost on restart.  Only durable messages on durable queues survive a broker restart.


----- Original Message -----
From: "fabio72" <>
Sent: Tuesday, February 21, 2017 4:08:02 AM
Subject: Re: Artemis MQTT durable messages and Topics

hi Justin,
after connecting via jmx we saw that all topics are durable (indipendently
from qos); analyzing the journal (using artemis data print) we can see that
all messages with qos>0 are durable .
We think that this behaviour may depends from following code:

for topics(from

   private Queue createQueueForSubscription(String topic, int qos) throws
Exception {
      String address = MQTTUtil.convertMQTTAddressFilterToCore(topic);
      SimpleString queue = getQueueNameForTopic(address);

      Queue q = session.getServer().locateQueue(queue);
      if (q == null) {
         q = session.getServerSession().createQueue(new
SimpleString(address), queue, managementFilter, false,
      return q;
for queues (from

   void handleMessage(int messageId, String topic, int qos, ByteBuf payload,
boolean retain) throws Exception {
      synchronized (lock) {
         ServerMessage serverMessage =
MQTTUtil.createServerMessageFromByteBuf(session, topic, retain, qos,

         if (qos > 0) {
Is it possible to use durable messages only for retained messages?


View this message in context:
Sent from the ActiveMQ - Dev mailing list archive at

View raw message