-
Notifications
You must be signed in to change notification settings - Fork 151
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
feat: multi namespace support #2378
base: master
Are you sure you want to change the base?
feat: multi namespace support #2378
Conversation
Signed-off-by: zhen.lei <yogurt_lei@foxmail.com>
Signed-off-by: zhen.lei <yogurt_lei@foxmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, thanks for opening this PR. Multi-namepace support is something we are interesting in adding. I left some comments on some other per namespace configurations we need.
...c/main/java/io/temporal/spring/boot/autoconfigure/properties/NonRootNamespaceProperties.java
Outdated
Show resolved
Hide resolved
...c/main/java/io/temporal/spring/boot/autoconfigure/properties/NonRootNamespaceProperties.java
Outdated
Show resolved
Hide resolved
...c/main/java/io/temporal/spring/boot/autoconfigure/properties/NonRootNamespaceProperties.java
Outdated
Show resolved
Hide resolved
...c/main/java/io/temporal/spring/boot/autoconfigure/properties/NonRootNamespaceProperties.java
Outdated
Show resolved
Hide resolved
Signed-off-by: zhen.lei <yogurt_lei@foxmail.com>
Signed-off-by: zhen.lei <yogurt_lei@foxmail.com>
Signed-off-by: zhen.lei <yogurt_lei@foxmail.com>
Signed-off-by: zhen.lei <yogurt_lei@foxmail.com>
Signed-off-by: zhen.lei <yogurt_lei@foxmail.com>
@Quinn-With-Two-Ns Add customizer and different connection by namespace. |
Signed-off-by: zhen.lei <yogurt_lei@foxmail.com>
@@ -70,6 +70,10 @@ | |||
*/ | |||
public interface DataConverter { | |||
|
|||
default boolean useInRootNamespace() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Dataconverter interface should not have any reference to springboot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The data converter should follow the same principle as all the other per NS beans
@@ -80,21 +86,20 @@ public NamespaceTemplate rootNamespaceTemplate( | |||
@Autowired(required = false) @Nullable Tracer otTracer, | |||
@Qualifier("temporalTestWorkflowEnvironmentAdapter") @Autowired(required = false) @Nullable | |||
TestWorkflowEnvironmentAdapter testWorkflowEnvironment, | |||
@Autowired(required = false) @Nullable | |||
@Qualifier("temporalWorkerFactoryCustomizer") @Autowired(required = false) @Nullable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't adding this @Qualifier
here filter break existing users since their TemporalOptionsCustomizer
bean may not be named this?
What was changed
The previous namespace is called RootNamespace.
A new configuration item named "temporal.namespaces" is added, and the configurations under it are all Non-rootNamespaces.
There are different workers and clients will register in different namespaces, and Activities and Workflows corresponding to a specific namespace can be discovered from different namespaces.
Why?
The current implementation only supports a single namespace.
In this PR, multi-namespaces support has been added.
Checklist
Closes
[Springboot] add support for multiple namespaces #1799
SpringBoot - add @Primary to temporalWorkflowClient WorkflowClient Bean #1811
How was this tested:
i. add new configuration
you can also define per-namespace specific bean.
ii. Wherever you want, we can inject the per-non-namespace bean via byName mode.
iii. Next, you can use beans from different namespaces anywhere.