Skip to content

ARTEMIS-6328 AMQP bridge to-address durable subscription ignores the auto-delete-durable-subscription settings and is auto-deleted by default - #6834

Merged
tabish121 merged 1 commit into
apache:mainfrom
grepjava:ARTEMIS-6328
Oct 28, 2026

Conversation

@grepjava

@grepjava grepjava commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

When a bridge-to-address policy uses durable subscriptions, AMQPBridgeToAddressSenderController.createServerConsumer builds the subscription queue in a local QueueConfiguration named configuration, which shadows the controller's AMQPBridgeSenderConfiguration. Its three auto-delete lines copied the new queue's own unset values onto itself, so auto-delete-durable-subscription, auto-delete-durable-subscription-message-count and auto-delete-durable-subscription-delay were never applied. The queue is created as auto-created, so the address settings filled the gaps: with the defaults, auto-delete-queues (true) removed the bridge's durable subscription once its link was gone and the queue was empty, and messages sent while the remote was unreachable were not kept for it.

The new queue's auto-delete values now come from the sender configuration (this.configuration), as AMQPFederationAddressSenderController sets them from its own.

AMQPBridgeToAddressTest.testBridgeCreatesDurableBindingWhenSenderConfiguredToUseDurableSubscriptions now runs with a 100 ms address queue scan period and checks the queue is not auto-delete and is still there after the peer goes. testBridgeToAddressCleansUpDurableBindingIfConfiguredTo now checks the queue has the configured delay and message count. Both fail without the fix: before it, the first queue was auto-deleted and the second passed only through the address settings' defaults.

https://issues.apache.org/jira/browse/ARTEMIS-6328

configuration.setAutoDelete(configuration.isAutoDelete());
configuration.setAutoDeleteMessageCount(configuration.getAutoDeleteMessageCount());
configuration.setAutoDeleteDelay(configuration.getAutoDeleteDelay());
final QueueConfiguration queueConfiguration = QueueConfiguration.of(queue);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rename change is unnecessary and obscures the actual changes that were needed, please revert that part.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted the rename. The local is configuration again, and the three auto-delete lines now read the sender's settings through this.configuration, since the local shadows the field. The main change is now just those three lines.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change seems fine now, need to squash the commits into one commit

…auto-delete-durable-subscription settings and is auto-deleted by default
@grepjava

Copy link
Copy Markdown
Contributor Author

The DescribeJournalTest failures are from main (they fail on every main build since ARTEMIS-6242). The MirroredVersionTest.testTopic failure in the first run is unrelated too. That test configures only mirroring, and the changed code runs only for an AMQP bridge-to policy.

@tabish121
tabish121 merged commit 8710c39 into apache:main Oct 28, 2026
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants