[英]KafkaTopicProvisioner - Failed to create topics
KafkaTopicProvisioner - Failed to create topics 2021-04-27T08:48:12.806690772Z org.apache.kafka.common.errors.PolicyViolationException: The service was unable to process the request; KafkaTopicProvisioner - 创建主题失败 2021-04-27T08:48:12.806690772Z org.apache.kafka.common.errors.PolicyViolationException:服务无法处理请求; please retry the operation.
请重试该操作。 For more information on exception types and proper exception handling, please refer to http://go.microsoft.com/fwlink/?LinkId=761101
有关异常类型和正确异常处理的更多信息,请参阅http://go.microsoft.com/fwlink/?LinkId=761101
I'm facing the above issue while working with Spring boot, Event hub, and Kafka.我在使用 Spring 启动、事件中心和 Kafka 时遇到了上述问题。 Below is the dependency I'm following.
以下是我正在关注的依赖项。
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>2.7.0</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-stream-kafka</artifactId>
<version>2.0.1.RELEASE</version>
<exclusions>
<exclusion>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>spring-cloud-azure-starter-eventhub</artifactId>
<version>1.0.0.M2</version>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</exclusion>
</exclusions>
</dependency>
You can import the dependency "com.azure.spring:azure-spring-cloud-starter-eventhubs-kafka" instead of kafka-clients, spring-cloud-starter-stream-kafka and spring-cloud-starter-stream-kafka, which can refer to https://learn.microsoft.com/azure/developer/java/spring-framework/configure-spring-cloud-stream-binder-java-app-kafka-azure-event-hub您可以导入依赖项“com.azure.spring:azure-spring-cloud-starter-eventhubs-kafka”而不是kafka-clients、spring-cloud-starter-stream-kafka和spring-cloud-starter-stream-kafka,它们可以参考https://learn.microsoft.com/azure/developer/java/spring-framework/configure-spring-cloud-stream-binder-java-app-kafka-azure-event-hub
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.