-
Notifications
You must be signed in to change notification settings - Fork 1.5k
AMQ-9689 - Network of Broker durable sync TTL fixes and improvements #1419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+375
−102
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit makes several improvements and fixes for syncing durable subscriptions when a network bridge connects. 1) A bug was fixed during durable sync that would cause the clientId to not always be included for durables in the subscription list which could cause a loop to be created as the other broker would not be able to tell where the network subscription came from. 2) During reactivation when dynamicOnly is false and durable sync is set to true, we make sure to include the TTL information (full broker path) from the online consumer attached to durables so that TTL info is properly propagated so we don't incorrectly create demand. Thisonly works if consumers are online, so for TTL > 1 it is still recommended to set dynamicOnly to true and allow only online consumers drive demand. 3) For TTL 1, we can handle sync correctly on restarts even if durables are offline and missing consumer TTL info because we know that we should ignore proxy durables (bridge durables for other bridges) entirely because they will be > 1 hop away. 4) Some other minor improvements were made like filtering everything if TTL is 0 and also consolidating logic.
mattrpav
reviewed
Apr 10, 2025
activemq-broker/src/main/java/org/apache/activemq/util/NetworkBridgeUtils.java
Outdated
Show resolved
Hide resolved
mattrpav
reviewed
Apr 10, 2025
activemq-unit-tests/src/test/java/org/apache/activemq/JmsMultipleBrokersTestSupport.java
Outdated
Show resolved
Hide resolved
mattrpav
reviewed
Apr 10, 2025
activemq-broker/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
Outdated
Show resolved
Hide resolved
Looks like all the tests have passed |
cshannon
added a commit
that referenced
this pull request
Apr 11, 2025
…1419) This commit makes several improvements and fixes for syncing durable subscriptions when a network bridge connects. 1) A bug was fixed during durable sync that would cause the clientId to not always be included for durables in the subscription list which could cause a loop to be created as the other broker would not be able to tell where the network subscription came from. 2) During reactivation when dynamicOnly is false and durable sync is set to true, we make sure to include the TTL information (full broker path) from the online consumer attached to durables so that TTL info is properly propagated so we don't incorrectly create demand. Thisonly works if consumers are online, so for TTL > 1 it is still recommended to set dynamicOnly to true and allow only online consumers drive demand. 3) For TTL 1, we can handle sync correctly on restarts even if durables are offline and missing consumer TTL info because we know that we should ignore proxy durables (bridge durables for other bridges) entirely because they will be > 1 hop away. 4) Some other minor improvements were made like filtering everything if TTL is 0 and also consolidating logic. (cherry picked from commit 953737c)
cshannon
added a commit
that referenced
this pull request
Apr 11, 2025
…1419) This commit makes several improvements and fixes for syncing durable subscriptions when a network bridge connects. 1) A bug was fixed during durable sync that would cause the clientId to not always be included for durables in the subscription list which could cause a loop to be created as the other broker would not be able to tell where the network subscription came from. 2) During reactivation when dynamicOnly is false and durable sync is set to true, we make sure to include the TTL information (full broker path) from the online consumer attached to durables so that TTL info is properly propagated so we don't incorrectly create demand. Thisonly works if consumers are online, so for TTL > 1 it is still recommended to set dynamicOnly to true and allow only online consumers drive demand. 3) For TTL 1, we can handle sync correctly on restarts even if durables are offline and missing consumer TTL info because we know that we should ignore proxy durables (bridge durables for other bridges) entirely because they will be > 1 hop away. 4) Some other minor improvements were made like filtering everything if TTL is 0 and also consolidating logic. (cherry picked from commit 953737c) (cherry picked from commit 182c598)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit makes several improvements and fixes for syncing durable subscriptions when a network bridge connects.
propagated so we don't incorrectly create demand. Thisonly works if
consumers are online, so for TTL > 1 it is still recommended to set dynamicOnly to true and allow only online consumers drive demand.