Azure-Samples/azure-spring-boot-samples

[QUERY] Error creating bean with name 'messageListenerContainer' defined in class path resource [/EventHubIntegrationConfiguration.class]

chavsur opened this issue · 1 comments

I am trying to implement integration with eventhub using this sample code. I am facing below exception while deploying service in AKS and even when running locally with gradle.
Exception : ConfigServletWebServerApplicationContext : Exception encountered during context
initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'messageListenerContainer' defined in class path resource
[/EventHubIntegrationConfiguration.class]:
Unsatisfied dependency expressed through method 'messageListenerContainer'
parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException:
No qualifying bean of type 'com.azure.spring.messaging.eventhubs.core.EventHubsProcessorFactory' available:
expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

*Please note that I am using same classes provided in this sample repo:

  1. EventHubIntegrationConfiguration.java
  2. ReceiveService.java
  3. SendController.java

I am not sure if I am missing anything, so it is not a bug and just a query.

**Setup **
IDE: IntelliJ

YML
cloud:
azure:
servicebus:
enabled: false
eventhubs:
connection-string: {my_connection_string}
processor:
checkpoint-store:
container-name: {my_store_container_name}
account-name: {my_account_name}
account-key: {my_account_key}

It was spring version issue