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

ZeebeLifecycleEventProducer is ignoring the ZeebeCondition #905

Open
zambrovski opened this issue Aug 15, 2024 · 0 comments
Open

ZeebeLifecycleEventProducer is ignoring the ZeebeCondition #905

zambrovski opened this issue Aug 15, 2024 · 0 comments

Comments

@zambrovski
Copy link
Contributor

zambrovski commented Aug 15, 2024

I have the Spring Boot Starter Camunda on my classpath and would like to disable zeebe (for a specific run mode). For doing so, I set camunda.client.zeebe.enabled=false property and management.health.zeebe.enabled=false property, so the auto configurations of the Zeebe client and its connection to Zeebe Cluster is disabled.

The Zeebe Event Lifecycle Producer still tries to inject the non-existing Zeebe client and fails:

***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 0 of method zeebeLifecycleEventProducer in io.camunda.zeebe.spring.client.CamundaAutoConfiguration required a bean of type 'io.camunda.zeebe.client.ZeebeClient' that could not be found.


Action:

Consider defining a bean of type 'io.camunda.zeebe.client.ZeebeClient' in your configuration.

I believe this is because the ZeebeCondition is ignored due to the second condition ( @ConditionalOnMissingBean(SpringZeebeTestContext.class)).

This makes it impossible to deactivate Zeebe by application properties.

As a workaround, I created a fake instance of the SpringZeebeTestContext:

  @Bean
  public SpringZeebeTestContext fakeTestContext() {
    return new SpringZeebeTestContext();
  }

This workaround helps because the condition is now satisfied.

See:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant