我们如何使用API从IDE在Kafka中创建主题,因为当我这样做时:
bin/kafka-create-topic.sh --topic mytopic --replica 3 --zookeeper localhost:2181
Run Code Online (Sandbox Code Playgroud)
我收到错误:
bash: bin/kafka-create-topic.sh: No such file or directory
Run Code Online (Sandbox Code Playgroud)
我按照原样关注了开发人员设置.
我看了一会儿,似乎没有找到答案。我正在使用Spring Boot 2,Spring Kafka 2.1.4,并且我想在Spring Boot执行器的/ metrics端点中看到kafka使用者度量。我不明白的是-我应该自己实施曝光还是在启动2中立即使用它?
如果我实现自己的自我,最好的方法是什么?
我有一个使用 apache kafka-streams 的 Spring Boot 应用程序。我不使用 spring 云流。我添加了执行器健康检查端点。我是application.yml这样配置的:
management:
health.db.enabled: false
endpoints.web:
base-path:
path-mapping.health: /
Run Code Online (Sandbox Code Playgroud)
当抛出运行时异常并且我的流被停止时,日志显示但运行状况检查状态为 UP。
2019-09-17 13:16:31.522 INFO 1 --- [ Thread-5] org.apache.kafka.streams.KafkaStreams : stream-client [lpp-model-stream-7e6e8fea-fcad-4033-92a4-5ede50de6e17] Streams client stopped complet伊利
如何将 kafka 流状态绑定到健康检查端点?
我的 pom.xml:
<dependencies>
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-streams</artifactId>
</dependency>
<dependency>
<groupId>data-wizards</groupId>
<artifactId>lpp-common-avro</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-streams-avro-serde</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
<dependency> …Run Code Online (Sandbox Code Playgroud)