azure-sdk-for-java icon indicating copy to clipboard operation
azure-sdk-for-java copied to clipboard

[BUG]spring-cloud-azure-starter-storage-blob with spring-kafka fails to consume a topic

Open thalleslmF opened this issue 3 years ago • 3 comments

Describe the bug When using the dependency spring-cloud-azure-starter-storage-blob with spring-kafka and try to create a consumer to listen to a topic im always receiving this error Received error INVALID_REQUEST from node -1 when making an ApiVersionsRequest with correlation id 50. If i remove the spring-cloud-azure-starter-storage-blob dependency its works perfectly. There is a workaround to fix this issue? Exception or Stack Trace

2022-08-10 21:21:30.878 WARN 78294 --- [ group-0-C-1] org.apache.kafka.clients.NetworkClient : [Consumer clientId=kafka-service-name-0, groupId=group] Received error INVALID_REQUEST from node -1 when making an ApiVersionsRequest with correlation id 15. Disconnecting. 2022-08-10 21:21:30.879 WARN 78294 --- [ group-0-C-1] org.apache.kafka.clients.NetworkClient : [Consumer clientId=kafka-service-name-0, groupId=group] Bootstrap broker localhost:9092 (id: -1 rack: null) disconnected

To Reproduce Start a project with the dependency of spring-cloud-azure-starter-storage-blob and spring-kafka and create a consumer

Setup (please complete the following information):

  • OS: [Linux]
  • IDE: [IntelliJ]
  • Library/Libraries:
  • Java version: 11
  • App Server/Environment:Tomcat
  • Frameworks: SpringBoot

Additional context Add any other context about the problem here.

Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • [ X] Bug Description Added
  • [ X] Repro Steps Added
  • [ X] Setup information Added

thalleslmF avatar Aug 11 '22 00:08 thalleslmF

Hi @thalleslmF , thanks for your reaching out! Could you please provide the Spring Kafka, Spring Boot, and Spring Cloud Azure Starter Storage Blob versions you used?

moarychan avatar Aug 11 '22 03:08 moarychan

@moarychan com.azure.spring:spring-cloud-azure-starter-storage-blob:jar:4.3.0 org.springframework.kafka:spring-kafka:jar:2.8.7 org.springframework.boot:spring-boot-starter-web:jar:2.7.1

thalleslmF avatar Aug 11 '22 11:08 thalleslmF

@backwind1233 , could you help to take a look?

moarychan avatar Aug 12 '22 00:08 moarychan

@thalleslmF Thanks for reaching out, this a known issue, it's the same as this issue. The issue has been resolved in https://github.com/Azure/azure-sdk-for-java/pull/30605, and will be available in our next release which version is 4.4.0. With version 4.4.0, you can configure spring.cloud.azure.eventhubs.kafka.enabled=false to address this issue.

A workaround to fix this issue for now is you can exclude com.azure.spring.cloud.autoconfigure.kafka.AzureEventHubsKafkaOAuth2AutoConfiguration

@SpringBootApplication(exclude = {
    AzureEventHubsKafkaOAuth2AutoConfiguration.class
})

backwind1233 avatar Aug 25 '22 05:08 backwind1233

thank you @backwind1233 i will try

thalleslmF avatar Aug 26 '22 15:08 thalleslmF