I’ve been playing around with the different event tracking processors and some questions regarding best practices for multi tenant support for event tracking and replaying.
From everything I’ve read it looks like using Tracking instead of Subscribing is the way to go and I’ve implemented a basic event tracking, replaying and up casting into our current application but the tracking tokens seem to be universal with no clear way of separating them.
Would it be possible to have tracking tokens split between the different tenants so when I go to reset tokens I could specify which tenant i would like to replay, it would also help the situation to not have a tenants data replayed if they want their data scrubbed but us still needing to keep axon events as a auditing trail.
We are currently using the EventHandlerInterceptor to set a ThreadLocal tenant id that is stored in the event payload which we then use to specify which mongo collection to save data into. Could I hook something into that?
This Extension is only for Axon Framework <> Axon Server. But if you are not using Axon Server, you should disable MultiTenancyAxonServerAutoConfiguration auto-configuration and implement the same factory beans from this class with equivalents using desired technology
Should the multitenant extension work with Axon Server SE?
Some of the documentation have Axon Server EE as a requirement while some just have Axon Server 4.6+ as a requirement.
I’ve setup a test environment and while its not straight out throwing an error about not having EE I’m getting io.grpc.StatusRuntimeException: UNIMPLEMENTED: Method not found: io.axoniq.axonserver.grpc.admin.ContextAdminService/GetContexts but GetContexts doesn’t look like a specific EE method to me.
It’s only for Axon Server Enterprise (supports multiple contexts), as the Standard edition supports only a single context, therefor can’t use context per tenant approach.
You may read more in the blog. But you are right, it does not mention the Enterprise version which is a mistake.
If you are interested I can provide you a trial Enterprise license to test the multitenancy app.