How should I configure the Spring boot part with multi tenancy (MT) in Camunda?
We have our own ProcessEngine Spring Factory that will create several underlying Camunda ProcessEngines (with own db) during startup, bases on the received tenant configuration. We use “RuntimeContainerDelegate.INSTANCE.get().registerProcessEngine” to register the process engines.
However, the camunda class SpringBootProcessApplication contains a default process engine, which is set to the first created process engine through the above call, and also registered this in the afterPropertieSet() method, that results in an Exception as their is already a ProcessEngine registered with the same name. That exception is easy to solve by overriding the method, however, I am wandering what the correct approach is concerning the (spring) configuration when using the above dynamic approach, that is: adding and removing your own process engines during runtime.
I read another post about this and this approach: LINK, but it doesn’t use Spring boot.
I am also seeing that a lof of beans are started by the Camunda Sprint boot config. What should I use or disable when using the above approach?
I think I should override the SpringBootProcessApplication and override the afterPropertiesSet and destroy() method to deal with multiple process engines, but is that enough? What do to more? And should I have som default process engine that I read about in other posts?
Please some advice?