You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Rene Koch (Jira)" <ji...@apache.org> on 2021/06/20 19:23:00 UTC

[jira] [Created] (ARTEMIS-3359) Auto-Create of non-durable queue not possible

Rene Koch created ARTEMIS-3359:
----------------------------------

             Summary: Auto-Create of non-durable queue not possible
                 Key: ARTEMIS-3359
                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3359
             Project: ActiveMQ Artemis
          Issue Type: Bug
    Affects Versions: 2.16.0
            Reporter: Rene Koch


I have a application in which I want to have 1 durable and 1 non-durable queue in Active MQ Artemis. For connecting to this message bus I use amqpnetlite (https://github.com/Azure/amqpnetlite)

 
{code:java}
  var source = new Source()
        {
        };

        if (durable)
        {
            source.Address = amqpAddressConverter.GetSubscriberAddress(address, useLoadBalancing);
            source.Durable = 1;
            source.ExpiryPolicy = new Symbol("never");
            source.DistributionMode = new Symbol("copy");
        }
        else
        {
            source.Address = amqpAddressConverter.GetSubscriberAddress(address);
            source.Durable = 0;
        }

        var receiverLink = new ReceiverLink(session, linkName, source, null); {code}
{{}}
So this is my receiver link. As shown I set the Durable uint of the Source which will given into the ReceiverLink.

Because as I saw in the Active MQ Artemis documentation, that the Durable is a boolean but within the amqpnetlite library it is an uint my understanding is that everything over 0 should be true and 0 should be false. (Seen here: [http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-terminus-durability)]

At first the behaviour was very strange: Even when the Aretemis Web interface was shown a queue as durable it would be deleted as soon as no consumer would be connected.

I found this:
 [https://stackoverflow.com/questions/66360625/activemq-artemis-queue-deleted-after-shutdown-of-consuming-client]
 which describes that even durable queues get deleted because of the default behaviour.

So I changed the broker.xml and set AUTO-DELETE-QUEUE to false.

Since then the behaviour completly switched:
 Both (durable = 1 and durable = 0) queues are being still there after the connection disconnected.

What I saw, either the configuration in the broker.xml - every queue will be durable = true, it doesn't mather what I set within the Link.

So how to create a durable and a non-durable connection correctly?



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