Currenlty a StreamsExecutionEnvironment instance can be registed directly through the AzkarraContext#addExecutionEnvironment method and from the configuration.
The following example shows how to define an environment using configuration :
azkarra {
// Create a environment for running the WordCountTopology
environments = [
{
name: "dev"
config = {}
jobs = [
{
name = "word-count-demo"
description = "Kafka Streams WordCount Demo"
topology = "WordCountTopology"
config = {}
}
]
}
]
}
But, this is not possible to declare an environement as a component, i.e :
Example:
@Factory
public class EnvironmentFactory {
@Component
@Named("dev")
public StreamsExecutionEnvironment devEnv() {
return DefaultStreamsExecutionEnvironment.create();
}
}
or
azkarraContext.registerSingleton("dev",
StreamsExecutionEnvironment.class,
() -> DefaultStreamsExecutionEnvironment.create()
);
This issue is an improvement to update the DefaultAzkarraContext and more specifically the private method preStart to automatically register all components of type StreamsExecutionEnvironment on context startup.
Currenlty a
StreamsExecutionEnvironmentinstance can be registed directly through theAzkarraContext#addExecutionEnvironmentmethod and from the configuration.The following example shows how to define an environment using configuration :
But, this is not possible to declare an environement as a component, i.e :
Example:
or
This issue is an improvement to update the
DefaultAzkarraContextand more specifically the private methodpreStartto automatically register all components of typeStreamsExecutionEnvironmenton context startup.