Skip to content
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

Improve auto reconnect for context/tenant detection #98

Open
schananas opened this issue Apr 26, 2023 · 1 comment
Open

Improve auto reconnect for context/tenant detection #98

schananas opened this issue Apr 26, 2023 · 1 comment

Comments

@schananas
Copy link
Contributor

schananas commented Apr 26, 2023

If a service is already running before Axon Server is started, the context is not propagated to the service until that service is restarted.
In other words, when a user of this extension connects during the "reconnect" phase and then a new context is created, the service is required to be restarted.

Steps to reproduce and problem

The following message from a user of the extension makes the predicament clear:

Hi,
We encounter a strange behaviour with the services and contexts: It looks like, that if a service is already running before the axon server is started, so the connection happens during "reconnect", and then a new context is created, the context is not propagated to the service, until that service is restarted again.
Is this Problem already known? is there a configuration option etc, that solves this?
(We are using the tenants for multi tenancy => new contexts will dynamically be created, and therefore it is important, that all services notice this new context.

For the context registration/detection we are using:

public TenantConnectPredicate tenantFilterPredicate() {
    return context -> context.tenantId().startsWith("organization-");
}

Expected behaviour

The Multitenancy Extension should be resilient and reconnect if context updates break the channel's connection.

Actual behaviour

The Multitenancy extension may lose the connection from the context updates channel.
Since it is unable to reconnect, future updates never occur.

@schananas schananas self-assigned this Apr 26, 2023
@smcvb smcvb added this to the Release 4.7.1 milestone Apr 26, 2023
@smcvb smcvb removed this from the Release 4.7.1 milestone Jun 21, 2023
@smcvb
Copy link
Member

smcvb commented Jun 21, 2023

Dropped this issue from release 4.7.1, as we did not have sufficient time to work on this for the upcoming release.

@smcvb smcvb added this to the Release 4.8.1 milestone Jun 21, 2023
@smcvb smcvb modified the milestones: Release 4.8.1, Release 4.9.0 Sep 12, 2023
@smcvb smcvb removed this from the Release 4.9.0 milestone Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants