Hi,
I am currently trying to use the temporal-spring-boot-starter-alpha SDK to setup temporal.io in my java project.
I am able to setup my project as per the doumentation and make it run successfully. However, I observed that even though I have configured the “spring.temporal.connection.target.namespace” in my application.properties file, it is not getting considered when I try to start a workflow. I get the following error, NOT_FOUND: Namespace name “default” not found
spring.temporal.connection.target.namespace=${TEMPORAL_NAMESPACE}
I have also created a bean implementing the *TemporalOptionsCustomizer* interface to customize the options. Only if I explicitly set the namespace here, then the workflow starts successfully without any issues.
Customizer bean implementation
@Component
public class WorkflowClientConfigurer implements
TemporalOptionsCustomizer<WorkflowClientOptions.Builder> {
@Value("${TEMPORAL_NAMESPACE}")
private String temporalNamespace;
@NotNull
@Override
public WorkflowClientOptions.Builder customize(
@NotNull WorkflowClientOptions.Builder optionsBuilder) {
optionsBuilder
.setNamespace(temporalNamespace)
.setContextPropagators(List.of(new ContextPropagator1(),
new ContextPropagator2()));
return optionsBuilder;
}
}
Could someone help to understand if this is the expected behavior or am I doing something wrong here?
Regards,
Kartik