Azure-Samples/azure-spring-boot-samples

[QUERY] spring-cloud-azure-starter-active-directory 4.3.0 disable Azure Event Hubs

Eimert opened this issue · 2 comments

Query/Question
Not sure if this question belongs here. Going from v4.2.0 to v4.3.0 of this dependency I was slapped in the face by an exception at startup:
"Invalid" bootstrap servers configured for Azure Event Hubs for Kafka! Must supply exactly 1 non-null bootstrap server configuration, with the format (..)"

I don't want to use Azure Event Hubs and I'm asking how to disable this.

Why is this not a Bug or a feature Request?

  • It's not a bug since this new requirement has clearly been put in the library deliberately.
  • This could be a feature request: when this Event Hubs thing cannot be disabled I'd like to have such option.

Setup (please complete the following information if applicable):

Information Checklist

  • Query Added
  • Setup information Added

@Eimert sorry for the late response. This bug has been fixed in 4.4.0, so you can upgrade to 4.4.0 and higher version without any code changes. If you still want to use 4.3.0, you have to exclude the autoconfiguration of com.azure.spring.cloud.autoconfigure.kafka.AzureEventHubsKafkaOAuth2AutoConfiguration, for example, adding a property of

spring.autoconfigure.exclude=com.azure.spring.cloud.autoconfigure.kafka.AzureEventHubsKafkaOAuth2AutoConfiguration

Using the latest version fixed it for us, thank you @yiliuTo.