在Apache Kafka中使用producer.properties和Consumer.properties文件 [英] Use of producer.properties and consumer.properties file in Apache Kafka

查看:90
本文介绍了在Apache Kafka中使用producer.properties和Consumer.properties文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Kafka软件包中有一个config文件夹,其中包含各种配置文件.该文件夹包含consumer.properties和producer.properties文件,这些配置是在我们运行Kafka集群时以及在我们的代码连接到kafka集群时使用的,还是仅是示例属性文件?文档对此不是很清楚.

Inside the Kafka package there is an config folder which has various config files. This folder has consumer.properties and producer.properties files, are these configurations used when we run the Kafka Cluster and when our code connects to kafka cluster or are these just sample property files? The documentation is not very clear on this.

我们有一个自动化工作,可以创建和部署新的kafka节点,我需要知道是否需要对这些文件进行任何更改.

We have an automation job that create and deploys new kafka nodes and I need to know whether any changes needs to be made in these files.

推荐答案

consumer.properties和producer.properties文件只是配置消费者或生产者应用程序的示例.例如, kafka-console-producer -consumer.config 参数可以被 kafka-console-consumer 控制台应用程序使用.>控制台应用程序,并带有-producer.config 参数.无论如何,甚至server.properties和zookeeper.properties文件都是代理和zookeeper的配置示例.

The consumer.properties and producer.properties files are just examples for configuring a consumer or producer application. They can be used by the kafka-console-consumer console application for example with the --consumer.config paramenter by the kafka-console-producer console application with the --producer.config parameter. In any case even server.properties and zookeeper.properties files are example of configuration for broker and zookeeper.

这篇关于在Apache Kafka中使用producer.properties和Consumer.properties文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆