Hi Fabio, Right now there is no way to specify the durability of just the Retained messages. It's something we can easily add as a new feature. Please open a JIRA and we'll look to get it implemented.
Regards Martyn On Tue, Feb 21, 2017 at 10:08 AM, fabio72 <[email protected]> wrote: > 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 MQTTSubscriptionManager.java): > > > 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, > MQTTUtil.DURABLE_MESSAGES && qos >= 0); > } > return q; > } > > > for queues (from MQTTPublishManager.java) > > // INBOUND > void handleMessage(int messageId, String topic, int qos, ByteBuf > payload, > boolean retain) throws Exception { > synchronized (lock) { > ServerMessage serverMessage = > MQTTUtil.createServerMessageFromByteBuf(session, topic, retain, qos, > payload); > > if (qos > 0) { > serverMessage.setDurable(MQTTUtil.DURABLE_MESSAGES); > } > > Is it possible to use durable messages only for retained messages? > > Tks > Fabio > > > > > > -- > View this message in context: http://activemq.2283324.n4. > nabble.com/Artemis-MQTT-durable-messages-and-Topics-tp4722239p4722274.html > Sent from the ActiveMQ - Dev mailing list archive at Nabble.com. >
