I noticed that the steps to reproduce don't include sending any messages to
the queue. Is that intentional? If the queue is empty on the primary then
it is does not appear on the backup after fail-over, but if the queue has
at least 1 message in it then it does appear on the backup after fail-over.
Did you also notice this behavior? Is your use-case dealing strictly with
empty queues?


Justin

On Wed, Oct 22, 2025 at 8:10 PM Illia <[email protected]> wrote:

> Hi Justin.
> I have prepared a Java app for you. The link -
> https://drive.google.com/file/d/1aLExH0nWTtWvdjFTw6KJIdid5wTXlJ9J/view?usp=sharing
> Steps to reproduce the issue:
> 1. Build Java app with *./mvnw clean package*
> 2. Start docker compose *docker compose up* which will start java client
> and 2 artemis nodes in replication mode (active and backup).
> 3. After the application is started, an address with the name
> "new-address" and a queue with the name "new-queue" are created.
> 4. Stop active node with *docker stop artemis-node-a*
> 5. Go to *http://localhost:8162/console/artemis
> <http://localhost:8162/console/artemis> *where you can observe that
> address was replicated and queue was not
> [image: image.png]
> [image: image.png]
>
> 6. The reason is that my queue is configured with autodelete:
> [image: image.png]
> 7. If you remove autoDelete and autoDeleteDeley lines and repeat
> everything from the beginning, you will notice that both address and queue
> are successfully replicated.
>
> My goal is to not delete queues immediately after failover when the queue
> auto delete flag is set to true. Is it even possible?
>
> Thanks! Best regards.
>
> ср, 22 окт. 2025 г. в 06:07, Justin Bertram <[email protected]>:
>
>> Nothing in the address-settings seems problematic. Can you work up some
>> instructions or ideally an automated reproducer so that I can observe the
>> same behavior that you described?
>>
>>
>> Justin
>>
>> On Tue, Oct 21, 2025 at 4:52 PM Illia <[email protected]> wrote:
>>
>> > Hi Justin.
>> > This my settings in broker.xml:
>> >
>> > <address-setting match="#">
>> >     <dead-letter-address>DLQ</dead-letter-address>
>> >     <expiry-address>ExpiryQueue</expiry-address>
>> >     <redelivery-delay>0</redelivery-delay>
>> >
>> >
>> >
>> <message-counter-history-day-limit>10</message-counter-history-day-limit>
>> >     <address-full-policy>PAGE</address-full-policy>
>> >     <auto-create-queues>true</auto-create-queues>
>> >     <auto-create-addresses>true</auto-create-addresses>
>> >     <auto-delete-queues>false</auto-delete-queues>
>> >     <auto-delete-addresses>false</auto-delete-addresses>
>> >
>> >     <!-- The size of each page file -->
>> >     <page-size-bytes>10M</page-size-bytes>
>> >
>> >     <!-- When we start applying the address-full-policy, e.g paging -->
>> >     <!-- Both are disabled by default, which means we will use the
>> > global-max-size/global-max-messages  -->
>> >     <max-size-bytes>-1</max-size-bytes>
>> >     <max-size-messages>-1</max-size-messages>
>> >
>> >     <!-- When we read from paging into queues (memory) -->
>> >
>> >     <max-read-page-messages>-1</max-read-page-messages>
>> >     <max-read-page-bytes>20M</max-read-page-bytes>
>> >
>> >     <!-- Limit on paging capacity before starting to throw errors -->
>> >
>> >     <page-limit-bytes>-1</page-limit-bytes>
>> >     <page-limit-messages>-1</page-limit-messages>
>> > </address-setting>
>> >
>> >
>> > ср, 22 окт. 2025 г. в 00:15, Justin Bertram <[email protected]>:
>> >
>> > > Can you provide the address settings that correspond to this queue?
>> > >
>> > > For what it's worth, setting the auto-delete message-count on the
>> queue
>> > to
>> > > -1 is not normal as that means the broker will delete the queue
>> > regardless
>> > > of the number of messages it contains. It might make sense depending
>> on
>> > > your use-case, but folks typically don't want to delete their messages
>> > > automatically.
>> > >
>> > >
>> > > Justin
>> > >
>> > > On Tue, Oct 21, 2025 at 3:28 PM Illia <[email protected]>
>> wrote:
>> > >
>> > > > Hi team. Could you please help me with the next issue.
>> > > >
>> > > > My cluster consists of two nodes with replication mode (live and
>> > backup)
>> > > > that are configured to auto delete queues.
>> > > >
>> > > > When my active node fails, I see that only addresses are replicated
>> to
>> > > the
>> > > > backup node but not queues. Seems that the reason is that my queues
>> are
>> > > > configured for auto delete. Queue replication works fine without the
>> > auto
>> > > > delete flag. I tried to set up an auto delete delay but it seems
>> that
>> > it
>> > > > still doesn’t work with failover.
>> > > >
>> > > > My goal is to not delete queues immediately after failover when the
>> > queue
>> > > > auto delete flag is set to true.
>> > > >
>> > > > Is there any way to do this?
>> > > >
>> > > > Here is my queue configuration in Java code:
>> > > >
>> > > >
>> > > >
>> > > >
>> > > >
>> > > >
>> > > >
>> > > >
>> > > > *final QueueConfiguration queueConfig =
>> > > >
>> > > >
>> > >
>> >
>> QueueConfiguration.of(queueName).setAddress(addressName).setRoutingType(RoutingType.ANYCAST).setAutoDelete(true).setAutoDeleteDelay(30000L).setAutoDeleteMessageCount(-1L).setPurgeOnNoConsumers(false).setNonDestructive(false);*
>> > > >
>> > > > Thanks! Best regards.
>> > > >
>> > >
>> >
>>
>

Reply via email to