Repository navigation
ARTEMIS-6328 AMQP bridge to-address durable subscription ignores the auto-delete-durable-subscription settings and is auto-deleted by default - #6834
Conversation
| configuration.setAutoDelete(configuration.isAutoDelete()); | ||
| configuration.setAutoDeleteMessageCount(configuration.getAutoDeleteMessageCount()); | ||
| configuration.setAutoDeleteDelay(configuration.getAutoDeleteDelay()); | ||
| final QueueConfiguration queueConfiguration = QueueConfiguration.of(queue); |
There was a problem hiding this comment.
This rename change is unnecessary and obscures the actual changes that were needed, please revert that part.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Change seems fine now, need to squash the commits into one commit
…auto-delete-durable-subscription settings and is auto-deleted by default
b6619f4 to
49fa8ee
Compare
|
The |
When a bridge-to-address policy uses durable subscriptions,
AMQPBridgeToAddressSenderController.createServerConsumerbuilds the subscription queue in a localQueueConfigurationnamedconfiguration, which shadows the controller'sAMQPBridgeSenderConfiguration. Its three auto-delete lines copied the new queue's own unset values onto itself, soauto-delete-durable-subscription,auto-delete-durable-subscription-message-countandauto-delete-durable-subscription-delaywere 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), asAMQPFederationAddressSenderControllersets them from its own.AMQPBridgeToAddressTest.testBridgeCreatesDurableBindingWhenSenderConfiguredToUseDurableSubscriptionsnow 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.testBridgeToAddressCleansUpDurableBindingIfConfiguredTonow 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