[ 
https://issues.apache.org/jira/browse/ARTEMIS-3359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17836343#comment-17836343
 ] 

Timothy A. Bish commented on ARTEMIS-3359:
------------------------------------------

TerminusDurability is not the same thing as queue durability and so is not used 
internally for indicating this, the client can you the dynamic node option to 
create a temporary queue attached to the subscription that will be destroyed 
when the client disconnects.  

The TerminusDurabily is only used in one place, appropriately, to indicate the 
subscription to a topic node is durable or not. That is, the link/terminus is 
durable or not. Not the queue the broker happens to create (which is an 
implementation detail, there need not be any queue) in terms of the AMQP 
specification. 

> 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
>            Priority: Major
>
> 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.20.10#820010)

Reply via email to