Skip to content

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
merged 2 commits into from
Apr 11, 2025

Conversation

cshannon
Copy link
Contributor

@cshannon cshannon commented Apr 10, 2025

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.

@cshannon cshannon self-assigned this Apr 10, 2025
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.
@cshannon
Copy link
Contributor Author

Looks like all the tests have passed

@cshannon cshannon merged commit 953737c into apache:main Apr 11, 2025
1 check 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants