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

Cancelling registration on single MultiTenantAwareComponent cancels registrations on all and closes AxonServer connection #194

Open
oleborne opened this issue Apr 20, 2024 · 3 comments

Comments

@oleborne
Copy link

Basic information

  • Axon Framework version: 4.9.2
  • JDK version: 17
  • Multi-Tenancy Extension version: 4.9.2
  • Complete executable reproducer if available (e.g. GitHub Repo): -

Steps to reproduce

  1. start a app using the Multi-Tenancy Extension connected to a AxonServer
  2. register MultiTenantAwareComponent against the TenantProvider (auto-configured to AxonServerTenantProvider)
  3. cancel that registration

Expected behaviour

All the individual tenant registration from the concerned MultiTenantAwareComponent are cancelled.
No other side-effects:

  • registrations for other MultiTenantAwareComponent are maintained
  • connection to Axon Server is maintained for all tenants

Actual behaviour

Registration for all MultiTenantAwareComponent are cancelled on all tenants, not just the concerned MultiTenantAwareComponent.
Connection for all tenants are closed on Axon Server.

See: https://github.com/AxonFramework/extension-multitenancy/blob/main/multitenancy-spring-boot-autoconfigure/src/main/java/org/axonframework/extensions/multitenancy/autoconfig/AxonServerTenantProvider.java#L204-L212

@schananas
Copy link
Contributor

Thanks for reporting this issue, based in a quick inspection, it appears this is indeed a bug.
We are already working on a patch that should be released in few weeks so we will include a fix for this issue as well.

I would like to propose a workaround if this is blocking you at the moment, but need more information on use case.
Are you building your own tenant aware component or you want to deregister a existing one?

You may also reach me to stefan.dragisic@axoniq.io if you want to share this information privately.

@oleborne
Copy link
Author

It is not blocking me: I was reading the code while implementing my own multi-tenant provider and I spotted the issue.

@abuijze abuijze modified the milestones: Release 4.9.3, Release 4.9.4 May 24, 2024
@smcvb smcvb removed this from the Release 4.9.4 milestone Jul 26, 2024
@smcvb
Copy link
Member

smcvb commented Jul 26, 2024

Removed issue from in progress, lowered the priority, and dropped the milestone 4.9.4 mention.
(1) This issue is currently not in progress, (2) the method is typically not touched at all by a user, (3) and because of the priority, this issue does not merit a 4.9.4 release.

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

4 participants