[ 
https://issues.apache.org/jira/browse/ARTEMIS-3236?focusedWorklogId=581384&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-581384
 ]

ASF GitHub Bot logged work on ARTEMIS-3236:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Apr/21 21:25
            Start Date: 12/Apr/21 21:25
    Worklog Time Spent: 10m 
      Work Description: clebertsuconic commented on a change in pull request 
#3537:
URL: https://github.com/apache/activemq-artemis/pull/3537#discussion_r611964890



##########
File path: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTQueueCleanTest.java
##########
@@ -31,6 +34,59 @@
 
    private static final Logger LOG = 
LoggerFactory.getLogger(MQTTQueueCleanTest.class);
 
+   @Test
+   public void testQueueClean() throws Exception {
+      String address = "clean/test";
+      String clientId = "mqtt-client";
+      String queueName = "::mqtt-client.clean.test";
+
+      server.addAddressInfo(new AddressInfo(address)
+                               .addRoutingType(RoutingType.MULTICAST)
+                               .setAutoCreated(false));
+
+      server.createQueue(new QueueConfiguration(queueName)
+                            .setAddress(address)
+                            .setRoutingType(RoutingType.MULTICAST)
+                            .setAutoCreated(false)
+                            .setAutoCreateAddress(false)
+                            .setAutoDelete(false));

Review comment:
       Wouldn't the subscription be created by MQTT itself?
   
   I understand the fix here would work if createQueue was called explicitly. 
But how a subscribe and disconnect would work with MQTT? Perhaps we should add 
an MQTT test as well?
   
   
   Also: I would combine the two tests with a sub-module passing an argument 
(auto-create true or false).
   
   That means, you create an internal method, and pass an argument with the 
difference in semantics.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 581384)
    Time Spent: 20m  (was: 10m)

> broker.xml defined queue deleted on MQTT client disconnect with 
> auto-delete-created-queues=false
> ------------------------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-3236
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3236
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 2.17.0
>         Environment: Artemis 2.17.0 on OpenJDK11
>            Reporter: Thorsten Kunz
>            Assignee: Domenico Francesco Bruscino
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> If have the following address configuration in my broker.xml
> {code:java}
>          <address name="COMMONNOTIFICATIONS.SMS">
>             <multicast>
>                <queue name="mqtt-client1.COMMONNOTIFICATIONS.SMS"/>
>                <queue name="mqtt-client2.COMMONNOTIFICATIONS.SMS"/>
>             </multicast>
>          </address>{code}
> With the following address configuration for match="#" and no more specific 
> configs
> {code:java}
>             <auto-create-queues>false</auto-create-queues>
>             <auto-delete-queues>true</auto-delete-queues>
>             
> <auto-delete-created-queues>false</auto-delete-created-queues>{code}
> So since the queues are not auto-created but statically in the configuration 
> I would expect the queue to survive the client disconnect even if it doesn't 
> contain any messages.
>  But the observed behaviour is that the client can connect after the broker 
> is started and if the client disconnects the queue is gone so that when the 
> client reconnects it gets an error message that the queue is not there 
> anymore.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to