Skip to content
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

StreamsExecutionEnvironment instances should be able to be registered as component #75

Open
fhussonnois opened this issue May 12, 2020 · 0 comments
Labels
good first issue Good for newcomers in:runtime This issue should impact the azkarra-runtime module type:enhancement New feature or request

Comments

@fhussonnois
Copy link
Member

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.

@fhussonnois fhussonnois added type:enhancement New feature or request good first issue Good for newcomers in:runtime This issue should impact the azkarra-runtime module labels May 12, 2020
@fhussonnois fhussonnois changed the title StreamsExecutionEnvironment instances should be able to be register as component StreamsExecutionEnvironment instances should be able to be registered as component May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers in:runtime This issue should impact the azkarra-runtime module type:enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant