kafka环境搭建
kafka环境搭建 for mac
对应qq群号:616961231
在之前的文章中, 有学习能力和兴趣爱好的同学,自己动手维护测试环境,丰衣足食是最好的办法,今天我们来讲讲kafka在mac上的安装
安装之前简单讲讲几个名词:
producer:
消息生产者,发布消息到 kafka 集群的终端或服务
broker:
kafka 集群中包含的服务器
consumer:
从 kafka 集群中消费消息的终端或服务
1. 安装kafka, 安装过程会自带安装zookeeper,下面来看安装步骤,
brew install kafka
louie-mac:~ louiezhou$ brew install kafka
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/cask and homebrew/core).
==> New Formulae
fx
==> Updated Formulae
abyss just
amqp-cpp knot
annie kotlin
ark libcec
ballerina librsvg
bitrise libuv
checkbashisms mariadb@10.2
chronograf mongodb
circleci openapi-generator
clang-format opus-tools
diffoscope passenger
elasticsearch phpunit
git-archive-all pipenv
git-subrepo poppler
gradio pulumi
grafana pumba
gwyddion pygobject3
hapi-fhir-cli selenium-server-standalone
jenkins sonarqube
jfrog-cli-go terragrunt
jhipster weaver
juju yamllint
==> Renamed Formulae
mat -> mat2
==> Installing dependencies for kafka: zookeeper
==> Installing kafka dependency: zookeeper
==> Downloading https://homebrew.bintray.com/bottles/zookeeper-3.4.13.high_sierr
######################################################################## 100.0%
==> Pouring zookeeper-3.4.13.high_sierra.bottle.tar.gz
==> Caveats
To have launchd start zookeeper now and restart at login:
brew services start zookeeper
Or, if you don't want/need a background service you can just run:
zkServer start
==> Summary
🍺 /usr/local/Cellar/zookeeper/3.4.13: 244 files, 33.4MB
==> Installing kafka
==> Downloading https://homebrew.bintray.com/bottles/kafka-2.0.0.high_sierra.bot
######################################################################## 100.0%
==> Pouring kafka-2.0.0.high_sierra.bottle.tar.gz
==> Caveats
To have launchd start kafka now and restart at login:
brew services start kafka
Or, if you don't want/need a background service you can just run:
zookeeper-server-start /usr/local/etc/kafka/zookeeper.properties & kafka-server-start /usr/local/etc/kafka/server.properties
==> Summary
🍺 /usr/local/Cellar/kafka/2.0.0: 160 files, 46.8MB
==> Caveats
==> zookeeper
To have launchd start zookeeper now and restart at login:
brew services start zookeeper
Or, if you don't want/need a background service you can just run:
zkServer start
==> kafka
To have launchd start kafka now and restart at login:
brew services start kafka
Or, if you don't want/need a background service you can just run:
zookeeper-server-start /usr/local/etc/kafka/zookeeper.properties & kafka-server-start /usr/local/etc/kafka/server.properties
louie-mac:~ louiezhou$
看到上述结果, 安装就成功了.
上面安装log告诉我们信息:
kafka :/usr/local/Cellar/kafka/2.0.0/bin目录
两个配置文件 /usr/local/etc/kafka/zookeeper.properties & kafka-server-start /usr/local/etc/kafka/server.properties
2.启动zookeeper ,进入目录 /usr/local/Cellar/kafka/2.0.0
执行如下命令:
louie-mac:2.0.0 louiezhou$ ./bin/zookeeper-server-start /usr/local/etc/kafka/zookeeper.properties &
[1] 7831
louie-mac:2.0.0 louiezhou$
louie-mac:2.0.0 louiezhou$
louie-mac:2.0.0 louiezhou$ [2018-11-16 11:49:55,134] INFO Reading configuration from: /usr/local/etc/kafka/zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2018-11-16 11:49:55,138] INFO autopurge.snapRetainCount set to 3 (org.apache.zookeeper.server.DatadirCleanupManager)
[2018-11-16 11:49:55,138] INFO autopurge.purgeInterval set to 0 (org.apache.zookeeper.server.DatadirCleanupManager)
[2018-11-16 11:49:55,138] INFO Purge task is not scheduled. (org.apache.zookeeper.server.DatadirCleanupManager)
[2018-11-16 11:49:55,138] WARN Either no config or no quorum defined in config, running in standalone mode (org.apache.zookeeper.server.quorum.QuorumPeerMain)
[2018-11-16 11:49:55,169] INFO Reading configuration from: /usr/local/etc/kafka/zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2018-11-16 11:49:55,169] INFO Starting server (org.apache.zookeeper.server.ZooKeeperServerMain)
[2018-11-16 11:49:55,189] INFO Server environment:zookeeper.version=3.4.13-2d71af4dbe22557fda74f9a9b4309b15a7487f03, built on 06/29/2018 00:39 GMT (org.apache.zookeeper.server.ZooKeeperServer)
[2018-11-16 11:49:55,189] INFO Server environment:host.name=192.168.5.32 (org.apache.zookeeper.server.ZooKeeperServer)
[2018-11-16 11:49:55,190] INFO Server environment:java.version=1.8.0_161 (org.apache.zookeeper.server.ZooKeeperServer)
[2018-11-16 11:49:55,190] INFO Server environment:java.vendor=Oracle Corporation (org.apache.zookeeper.server.ZooKeeperServer)
[2018-11-16 11:49:55,190] INFO Server environment:java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/jre (org.apache.zookeeper.server.ZooKeeperServer)
[2018-11-16 11:49:55,190] INFO Server environment:java.class.path=.:/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home//lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home//lib/tools.jar:/Users/louiezhou/Downloads/download_application/apache-jmeter-2.11/lib/ext/ApacheJMeter_core.jar:/Users/louiezhou/Downloads/download_application/apache-jmeter-2.11/lib/jorphan.jar:/Users/louiezhou/Downloads/download_application/apache-jmeter-2.11/lib/logkit-2.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/activation-1.1.1.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/aopalliance-repackaged-2.5.0-b42.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/argparse4j-0.7.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/audience-annotations-0.5.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/commons-lang3-3.5.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/connect-api-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/connect-basic-auth-extension-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/connect-file-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/connect-json-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/connect-runtime-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/connect-transforms-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/guava-20.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/hk2-api-2.5.0-b42.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/hk2-locator-2.5.0-b42.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/hk2-utils-2.5.0-b42.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jackson-annotations-2.9.6.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jackson-core-2.9.6.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jackson-databind-2.9.6.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jackson-jaxrs-base-2.9.6.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jackson-jaxrs-json-provider-2.9.6.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jackson-module-jaxb-annotations-2.9.6.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/javassist-3.22.0-CR2.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/javax.annotation-api-1.2.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/javax.inject-1.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/javax.inject-2.5.0-b42.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/javax.servlet-api-3.1.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/javax.ws.rs-api-2.1.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jaxb-api-2.3.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jersey-client-2.27.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jersey-common-2.27.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jersey-container-servlet-2.27.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jersey-container-servlet-core-2.27.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jersey-hk2-2.27.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jersey-media-jaxb-2.27.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jersey-server-2.27.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jetty-client-9.4.11.v20180605.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jetty-continuation-9.4.11.v20180605.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jetty-http-9.4.11.v20180605.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jetty-io-9.4.11.v20180605.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jetty-security-9.4.11.v20180605.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jetty-server-9.4.11.v20180605.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jetty-servlet-9.4.11.v20180605.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jetty-servlets-9.4.11.v20180605.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jetty-util-9.4.11.v20180605.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jopt-simple-5.0.4.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/kafka-clients-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/kafka-log4j-appender-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/kafka-streams-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/kafka-streams-examples-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/kafka-streams-scala_2.12-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/kafka-streams-test-utils-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/kafka-tools-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/kafka_2.12-2.0.0-sources.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/kafka_2.12-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/log4j-1.2.17.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/lz4-java-1.4.1.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/maven-artifact-3.5.3.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/metrics-core-2.2.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/osgi-resource-locator-1.0.1.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/plexus-utils-3.1.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/reflections-0.9.11.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/rocksdbjni-5.7.3.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/scala-library-2.12.6.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/scala-logging_2.12-3.9.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/scala-reflect-2.12.6.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/slf4j-api-1.7.25.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/slf4j-log4j12-1.7.25.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/snappy-java-1.1.7.1.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/validation-api-1.1.0.Final.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/zkclient-0.10.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/zookeeper-3.4.13.jar (org.apache.zookeeper.server.ZooKeeperServer)
[2018-11-16 11:49:55,191] INFO Server environment:java.library.path=/Users/louiezhou/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:. (org.apache.zookeeper.server.ZooKeeperServer)
[2018-11-16 11:49:55,191] INFO Server environment:java.io.tmpdir=/var/folders/_r/fb0dg1jj4rd2yc21ybfkm9_h0000gn/T/ (org.apache.zookeeper.server.ZooKeeperServer)
[2018-11-16 11:49:55,191] INFO Server environment:java.compiler=<NA> (org.apache.zookeeper.server.ZooKeeperServer)
[2018-11-16 11:49:55,191] INFO Server environment:os.name=Mac OS X (org.apache.zookeeper.server.ZooKeeperServer)
[2018-11-16 11:49:55,191] INFO Server environment:os.arch=x86_64 (org.apache.zookeeper.server.ZooKeeperServer)
[2018-11-16 11:49:55,191] INFO Server environment:os.version=10.13.3 (org.apache.zookeeper.server.ZooKeeperServer)
[2018-11-16 11:49:55,192] INFO Server environment:user.name=louiezhou (org.apache.zookeeper.server.ZooKeeperServer)
[2018-11-16 11:49:55,192] INFO Server environment:user.home=/Users/louiezhou (org.apache.zookeeper.server.ZooKeeperServer)
[2018-11-16 11:49:55,192] INFO Server environment:user.dir=/usr/local/Cellar/kafka/2.0.0 (org.apache.zookeeper.server.ZooKeeperServer)
[2018-11-16 11:49:55,225] INFO tickTime set to 3000 (org.apache.zookeeper.server.ZooKeeperServer)
[2018-11-16 11:49:55,225] INFO minSessionTimeout set to -1 (org.apache.zookeeper.server.ZooKeeperServer)
[2018-11-16 11:49:55,226] INFO maxSessionTimeout set to -1 (org.apache.zookeeper.server.ZooKeeperServer)
[2018-11-16 11:49:55,276] INFO Using org.apache.zookeeper.server.NIOServerCnxnFactory as server connection factory (org.apache.zookeeper.server.ServerCnxnFactory)
[2018-11-16 11:49:55,324] INFO binding to port 0.0.0.0/0.0.0.0:2181 (org.apache.zookeeper.server.NIOServerCnxnFactory)
3.启动kafka服务:
louie-mac:2.0.0 louiezhou$ ./bin/kafka-server-start /usr/local/etc/kafka/server.properties &
[1] 8383
louie-mac:2.0.0 louiezhou$ [2018-11-16 11:54:56,054] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$)
[2018-11-16 11:54:56,898] INFO starting (kafka.server.KafkaServer)
[2018-11-16 11:54:56,900] INFO Connecting to zookeeper on localhost:2181 (kafka.server.KafkaServer)
[2018-11-16 11:54:56,933] INFO [ZooKeeperClient] Initializing a new session to localhost:2181. (kafka.zookeeper.ZooKeeperClient)
[2018-11-16 11:54:56,942] INFO Client environment:zookeeper.version=3.4.13-2d71af4dbe22557fda74f9a9b4309b15a7487f03, built on 06/29/2018 00:39 GMT (org.apache.zookeeper.ZooKeeper)
[2018-11-16 11:54:56,942] INFO Client environment:host.name=192.168.5.32 (org.apache.zookeeper.ZooKeeper)
[2018-11-16 11:54:56,942] INFO Client environment:java.version=1.8.0_161 (org.apache.zookeeper.ZooKeeper)
[2018-11-16 11:54:56,942] INFO Client environment:java.vendor=Oracle Corporation (org.apache.zookeeper.ZooKeeper)
[2018-11-16 11:54:56,942] INFO Client environment:java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/jre (org.apache.zookeeper.ZooKeeper)
[2018-11-16 11:54:56,942] INFO Client environment:java.class.path=.:/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home//lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home//lib/tools.jar:/Users/louiezhou/Downloads/download_application/apache-jmeter-2.11/lib/ext/ApacheJMeter_core.jar:/Users/louiezhou/Downloads/download_application/apache-jmeter-2.11/lib/jorphan.jar:/Users/louiezhou/Downloads/download_application/apache-jmeter-2.11/lib/logkit-2.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/activation-1.1.1.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/aopalliance-repackaged-2.5.0-b42.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/argparse4j-0.7.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/audience-annotations-0.5.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/commons-lang3-3.5.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/connect-api-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/connect-basic-auth-extension-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/connect-file-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/connect-json-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/connect-runtime-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/connect-transforms-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/guava-20.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/hk2-api-2.5.0-b42.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/hk2-locator-2.5.0-b42.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/hk2-utils-2.5.0-b42.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jackson-annotations-2.9.6.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jackson-core-2.9.6.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jackson-databind-2.9.6.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jackson-jaxrs-base-2.9.6.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jackson-jaxrs-json-provider-2.9.6.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jackson-module-jaxb-annotations-2.9.6.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/javassist-3.22.0-CR2.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/javax.annotation-api-1.2.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/javax.inject-1.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/javax.inject-2.5.0-b42.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/javax.servlet-api-3.1.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/javax.ws.rs-api-2.1.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jaxb-api-2.3.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jersey-client-2.27.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jersey-common-2.27.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jersey-container-servlet-2.27.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jersey-container-servlet-core-2.27.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jersey-hk2-2.27.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jersey-media-jaxb-2.27.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jersey-server-2.27.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jetty-client-9.4.11.v20180605.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jetty-continuation-9.4.11.v20180605.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jetty-http-9.4.11.v20180605.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jetty-io-9.4.11.v20180605.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jetty-security-9.4.11.v20180605.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jetty-server-9.4.11.v20180605.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jetty-servlet-9.4.11.v20180605.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jetty-servlets-9.4.11.v20180605.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jetty-util-9.4.11.v20180605.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/jopt-simple-5.0.4.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/kafka-clients-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/kafka-log4j-appender-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/kafka-streams-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/kafka-streams-examples-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/kafka-streams-scala_2.12-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/kafka-streams-test-utils-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/kafka-tools-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/kafka_2.12-2.0.0-sources.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/kafka_2.12-2.0.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/log4j-1.2.17.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/lz4-java-1.4.1.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/maven-artifact-3.5.3.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/metrics-core-2.2.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/osgi-resource-locator-1.0.1.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/plexus-utils-3.1.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/reflections-0.9.11.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/rocksdbjni-5.7.3.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/scala-library-2.12.6.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/scala-logging_2.12-3.9.0.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/scala-reflect-2.12.6.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/slf4j-api-1.7.25.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/slf4j-log4j12-1.7.25.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/snappy-java-1.1.7.1.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/validation-api-1.1.0.Final.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/zkclient-0.10.jar:/usr/local/Cellar/kafka/2.0.0/libexec/bin/../libs/zookeeper-3.4.13.jar (org.apache.zookeeper.ZooKeeper)
[2018-11-16 11:54:56,943] INFO Client environment:java.library.path=/Users/louiezhou/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:. (org.apache.zookeeper.ZooKeeper)
[2018-11-16 11:54:56,943] INFO Client environment:java.io.tmpdir=/var/folders/_r/fb0dg1jj4rd2yc21ybfkm9_h0000gn/T/ (org.apache.zookeeper.ZooKeeper)
[2018-11-16 11:54:56,944] INFO Client environment:java.compiler=<NA> (org.apache.zookeeper.ZooKeeper)
[2018-11-16 11:54:56,944] INFO Client environment:os.name=Mac OS X (org.apache.zookeeper.ZooKeeper)
[2018-11-16 11:54:56,944] INFO Client environment:os.arch=x86_64 (org.apache.zookeeper.ZooKeeper)
[2018-11-16 11:54:56,944] INFO Client environment:os.version=10.13.3 (org.apache.zookeeper.ZooKeeper)
[2018-11-16 11:54:56,944] INFO Client environment:user.name=louiezhou (org.apache.zookeeper.ZooKeeper)
[2018-11-16 11:54:56,944] INFO Client environment:user.home=/Users/louiezhou (org.apache.zookeeper.ZooKeeper)
[2018-11-16 11:54:56,944] INFO Client environment:user.dir=/usr/local/Cellar/kafka/2.0.0 (org.apache.zookeeper.ZooKeeper)
[2018-11-16 11:54:56,946] INFO Initiating client connection, connectString=localhost:2181 sessionTimeout=6000 watcher=kafka.zookeeper.ZooKeeperClient$ZooKeeperClientWatcher$@48e4374 (org.apache.zookeeper.ZooKeeper)
[2018-11-16 11:54:56,967] INFO Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
[2018-11-16 11:54:56,968] INFO [ZooKeeperClient] Waiting until connected. (kafka.zookeeper.ZooKeeperClient)
[2018-11-16 11:54:57,000] INFO Socket connection established to localhost/127.0.0.1:2181, initiating session (org.apache.zookeeper.ClientCnxn)
[2018-11-16 11:54:57,046] INFO Session establishment complete on server localhost/127.0.0.1:2181, sessionid = 0x100005d98770000, negotiated timeout = 6000 (org.apache.zookeeper.ClientCnxn)
[2018-11-16 11:54:57,050] INFO [ZooKeeperClient] Connected. (kafka.zookeeper.ZooKeeperClient)
[2018-11-16 11:54:57,530] INFO Cluster ID = x0JKkMMtSkS5mN_rE5MMiw (kafka.server.KafkaServer)
[2018-11-16 11:54:57,597] WARN No meta.properties file under dir /usr/local/var/lib/kafka-logs/meta.properties (kafka.server.BrokerMetadataCheckpoint)
[2018-11-16 11:54:57,754] INFO KafkaConfig values:
advertised.host.name = null
advertised.listeners = null
advertised.port = null
alter.config.policy.class.name = null
alter.log.dirs.replication.quota.window.num = 11
alter.log.dirs.replication.quota.window.size.seconds = 1
authorizer.class.name =
auto.create.topics.enable = true
auto.leader.rebalance.enable = true
background.threads = 10
broker.id = 0
broker.id.generation.enable = true
broker.rack = null
client.quota.callback.class = null
compression.type = producer
connections.max.idle.ms = 600000
controlled.shutdown.enable = true
controlled.shutdown.max.retries = 3
controlled.shutdown.retry.backoff.ms = 5000
controller.socket.timeout.ms = 30000
create.topic.policy.class.name = null
default.replication.factor = 1
delegation.token.expiry.check.interval.ms = 3600000
delegation.token.expiry.time.ms = 86400000
delegation.token.master.key = null
delegation.token.max.lifetime.ms = 604800000
delete.records.purgatory.purge.interval.requests = 1
delete.topic.enable = true
fetch.purgatory.purge.interval.requests = 1000
group.initial.rebalance.delay.ms = 0
group.max.session.timeout.ms = 300000
group.min.session.timeout.ms = 6000
host.name =
inter.broker.listener.name = null
inter.broker.protocol.version = 2.0-IV1
leader.imbalance.check.interval.seconds = 300
leader.imbalance.per.broker.percentage = 10
listener.security.protocol.map = PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL
listeners = null
log.cleaner.backoff.ms = 15000
log.cleaner.dedupe.buffer.size = 134217728
log.cleaner.delete.retention.ms = 86400000
log.cleaner.enable = true
log.cleaner.io.buffer.load.factor = 0.9
log.cleaner.io.buffer.size = 524288
log.cleaner.io.max.bytes.per.second = 1.7976931348623157E308
log.cleaner.min.cleanable.ratio = 0.5
log.cleaner.min.compaction.lag.ms = 0
log.cleaner.threads = 1
log.cleanup.policy = [delete]
log.dir = /tmp/kafka-logs
log.dirs = /usr/local/var/lib/kafka-logs
log.flush.interval.messages = 9223372036854775807
log.flush.interval.ms = null
log.flush.offset.checkpoint.interval.ms = 60000
log.flush.scheduler.interval.ms = 9223372036854775807
log.flush.start.offset.checkpoint.interval.ms = 60000
log.index.interval.bytes = 4096
log.index.size.max.bytes = 10485760
log.message.downconversion.enable = true
log.message.format.version = 2.0-IV1
log.message.timestamp.difference.max.ms = 9223372036854775807
log.message.timestamp.type = CreateTime
log.preallocate = false
log.retention.bytes = -1
log.retention.check.interval.ms = 300000
log.retention.hours = 168
log.retention.minutes = null
log.retention.ms = null
log.roll.hours = 168
log.roll.jitter.hours = 0
log.roll.jitter.ms = null
log.roll.ms = null
log.segment.bytes = 1073741824
log.segment.delete.delay.ms = 60000
max.connections.per.ip = 2147483647
max.connections.per.ip.overrides =
max.incremental.fetch.session.cache.slots = 1000
message.max.bytes = 1000012
metric.reporters = []
metrics.num.samples = 2
metrics.recording.level = INFO
metrics.sample.window.ms = 30000
min.insync.replicas = 1
num.io.threads = 8
num.network.threads = 3
num.partitions = 1
num.recovery.threads.per.data.dir = 1
num.replica.alter.log.dirs.threads = null
num.replica.fetchers = 1
offset.metadata.max.bytes = 4096
offsets.commit.required.acks = -1
offsets.commit.timeout.ms = 5000
offsets.load.buffer.size = 5242880
offsets.retention.check.interval.ms = 600000
offsets.retention.minutes = 10080
offsets.topic.compression.codec = 0
offsets.topic.num.partitions = 50
offsets.topic.replication.factor = 1
offsets.topic.segment.bytes = 104857600
password.encoder.cipher.algorithm = AES/CBC/PKCS5Padding
password.encoder.iterations = 4096
password.encoder.key.length = 128
password.encoder.keyfactory.algorithm = null
password.encoder.old.secret = null
password.encoder.secret = null
port = 9092
principal.builder.class = null
producer.purgatory.purge.interval.requests = 1000
queued.max.request.bytes = -1
queued.max.requests = 500
quota.consumer.default = 9223372036854775807
quota.producer.default = 9223372036854775807
quota.window.num = 11
quota.window.size.seconds = 1
replica.fetch.backoff.ms = 1000
replica.fetch.max.bytes = 1048576
replica.fetch.min.bytes = 1
replica.fetch.response.max.bytes = 10485760
replica.fetch.wait.max.ms = 500
replica.high.watermark.checkpoint.interval.ms = 5000
replica.lag.time.max.ms = 10000
replica.socket.receive.buffer.bytes = 65536
replica.socket.timeout.ms = 30000
replication.quota.window.num = 11
replication.quota.window.size.seconds = 1
request.timeout.ms = 30000
reserved.broker.max.id = 1000
sasl.client.callback.handler.class = null
sasl.enabled.mechanisms = [GSSAPI]
sasl.jaas.config = null
sasl.kerberos.kinit.cmd = /usr/bin/kinit
sasl.kerberos.min.time.before.relogin = 60000
sasl.kerberos.principal.to.local.rules = [DEFAULT]
sasl.kerberos.service.name = null
sasl.kerberos.ticket.renew.jitter = 0.05
sasl.kerberos.ticket.renew.window.factor = 0.8
sasl.login.callback.handler.class = null
sasl.login.class = null
sasl.login.refresh.buffer.seconds = 300
sasl.login.refresh.min.period.seconds = 60
sasl.login.refresh.window.factor = 0.8
sasl.login.refresh.window.jitter = 0.05
sasl.mechanism.inter.broker.protocol = GSSAPI
sasl.server.callback.handler.class = null
security.inter.broker.protocol = PLAINTEXT
socket.receive.buffer.bytes = 102400
socket.request.max.bytes = 104857600
socket.send.buffer.bytes = 102400
ssl.cipher.suites = []
ssl.client.auth = none
ssl.enabled.protocols = [TLSv1.2, TLSv1.1, TLSv1]
ssl.endpoint.identification.algorithm = https
ssl.key.password = null
ssl.keymanager.algorithm = SunX509
ssl.keystore.location = null
ssl.keystore.password = null
ssl.keystore.type = JKS
ssl.protocol = TLS
ssl.provider = null
ssl.secure.random.implementation = null
ssl.trustmanager.algorithm = PKIX
ssl.truststore.location = null
ssl.truststore.password = null
ssl.truststore.type = JKS
transaction.abort.timed.out.transaction.cleanup.interval.ms = 60000
transaction.max.timeout.ms = 900000
transaction.remove.expired.transaction.cleanup.interval.ms = 3600000
transaction.state.log.load.buffer.size = 5242880
transaction.state.log.min.isr = 1
transaction.state.log.num.partitions = 50
transaction.state.log.replication.factor = 1
transaction.state.log.segment.bytes = 104857600
transactional.id.expiration.ms = 604800000
unclean.leader.election.enable = false
zookeeper.connect = localhost:2181
zookeeper.connection.timeout.ms = 6000
zookeeper.max.in.flight.requests = 10
zookeeper.session.timeout.ms = 6000
zookeeper.set.acl = false
zookeeper.sync.time.ms = 2000
(kafka.server.KafkaConfig)
[2018-11-16 11:54:57,774] INFO KafkaConfig values:
advertised.host.name = null
advertised.listeners = null
advertised.port = null
alter.config.policy.class.name = null
alter.log.dirs.replication.quota.window.num = 11
alter.log.dirs.replication.quota.window.size.seconds = 1
authorizer.class.name =
auto.create.topics.enable = true
auto.leader.rebalance.enable = true
background.threads = 10
broker.id = 0
broker.id.generation.enable = true
broker.rack = null
client.quota.callback.class = null
compression.type = producer
connections.max.idle.ms = 600000
controlled.shutdown.enable = true
controlled.shutdown.max.retries = 3
controlled.shutdown.retry.backoff.ms = 5000
controller.socket.timeout.ms = 30000
create.topic.policy.class.name = null
default.replication.factor = 1
delegation.token.expiry.check.interval.ms = 3600000
delegation.token.expiry.time.ms = 86400000
delegation.token.master.key = null
delegation.token.max.lifetime.ms = 604800000
delete.records.purgatory.purge.interval.requests = 1
delete.topic.enable = true
fetch.purgatory.purge.interval.requests = 1000
group.initial.rebalance.delay.ms = 0
group.max.session.timeout.ms = 300000
group.min.session.timeout.ms = 6000
host.name =
inter.broker.listener.name = null
inter.broker.protocol.version = 2.0-IV1
leader.imbalance.check.interval.seconds = 300
leader.imbalance.per.broker.percentage = 10
listener.security.protocol.map = PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL
listeners = null
log.cleaner.backoff.ms = 15000
log.cleaner.dedupe.buffer.size = 134217728
log.cleaner.delete.retention.ms = 86400000
log.cleaner.enable = true
log.cleaner.io.buffer.load.factor = 0.9
log.cleaner.io.buffer.size = 524288
log.cleaner.io.max.bytes.per.second = 1.7976931348623157E308
log.cleaner.min.cleanable.ratio = 0.5
log.cleaner.min.compaction.lag.ms = 0
log.cleaner.threads = 1
log.cleanup.policy = [delete]
log.dir = /tmp/kafka-logs
log.dirs = /usr/local/var/lib/kafka-logs
log.flush.interval.messages = 9223372036854775807
log.flush.interval.ms = null
log.flush.offset.checkpoint.interval.ms = 60000
log.flush.scheduler.interval.ms = 9223372036854775807
log.flush.start.offset.checkpoint.interval.ms = 60000
log.index.interval.bytes = 4096
log.index.size.max.bytes = 10485760
log.message.downconversion.enable = true
log.message.format.version = 2.0-IV1
log.message.timestamp.difference.max.ms = 9223372036854775807
log.message.timestamp.type = CreateTime
log.preallocate = false
log.retention.bytes = -1
log.retention.check.interval.ms = 300000
log.retention.hours = 168
log.retention.minutes = null
log.retention.ms = null
log.roll.hours = 168
log.roll.jitter.hours = 0
log.roll.jitter.ms = null
log.roll.ms = null
log.segment.bytes = 1073741824
log.segment.delete.delay.ms = 60000
max.connections.per.ip = 2147483647
max.connections.per.ip.overrides =
max.incremental.fetch.session.cache.slots = 1000
message.max.bytes = 1000012
metric.reporters = []
metrics.num.samples = 2
metrics.recording.level = INFO
metrics.sample.window.ms = 30000
min.insync.replicas = 1
num.io.threads = 8
num.network.threads = 3
num.partitions = 1
num.recovery.threads.per.data.dir = 1
num.replica.alter.log.dirs.threads = null
num.replica.fetchers = 1
offset.metadata.max.bytes = 4096
offsets.commit.required.acks = -1
offsets.commit.timeout.ms = 5000
offsets.load.buffer.size = 5242880
offsets.retention.check.interval.ms = 600000
offsets.retention.minutes = 10080
offsets.topic.compression.codec = 0
offsets.topic.num.partitions = 50
offsets.topic.replication.factor = 1
offsets.topic.segment.bytes = 104857600
password.encoder.cipher.algorithm = AES/CBC/PKCS5Padding
password.encoder.iterations = 4096
password.encoder.key.length = 128
password.encoder.keyfactory.algorithm = null
password.encoder.old.secret = null
password.encoder.secret = null
port = 9092
principal.builder.class = null
producer.purgatory.purge.interval.requests = 1000
queued.max.request.bytes = -1
queued.max.requests = 500
quota.consumer.default = 9223372036854775807
quota.producer.default = 9223372036854775807
quota.window.num = 11
quota.window.size.seconds = 1
replica.fetch.backoff.ms = 1000
replica.fetch.max.bytes = 1048576
replica.fetch.min.bytes = 1
replica.fetch.response.max.bytes = 10485760
replica.fetch.wait.max.ms = 500
replica.high.watermark.checkpoint.interval.ms = 5000
replica.lag.time.max.ms = 10000
replica.socket.receive.buffer.bytes = 65536
replica.socket.timeout.ms = 30000
replication.quota.window.num = 11
replication.quota.window.size.seconds = 1
request.timeout.ms = 30000
reserved.broker.max.id = 1000
sasl.client.callback.handler.class = null
sasl.enabled.mechanisms = [GSSAPI]
sasl.jaas.config = null
sasl.kerberos.kinit.cmd = /usr/bin/kinit
sasl.kerberos.min.time.before.relogin = 60000
sasl.kerberos.principal.to.local.rules = [DEFAULT]
sasl.kerberos.service.name = null
sasl.kerberos.ticket.renew.jitter = 0.05
sasl.kerberos.ticket.renew.window.factor = 0.8
sasl.login.callback.handler.class = null
sasl.login.class = null
sasl.login.refresh.buffer.seconds = 300
sasl.login.refresh.min.period.seconds = 60
sasl.login.refresh.window.factor = 0.8
sasl.login.refresh.window.jitter = 0.05
sasl.mechanism.inter.broker.protocol = GSSAPI
sasl.server.callback.handler.class = null
security.inter.broker.protocol = PLAINTEXT
socket.receive.buffer.bytes = 102400
socket.request.max.bytes = 104857600
socket.send.buffer.bytes = 102400
ssl.cipher.suites = []
ssl.client.auth = none
ssl.enabled.protocols = [TLSv1.2, TLSv1.1, TLSv1]
ssl.endpoint.identification.algorithm = https
ssl.key.password = null
ssl.keymanager.algorithm = SunX509
ssl.keystore.location = null
ssl.keystore.password = null
ssl.keystore.type = JKS
ssl.protocol = TLS
ssl.provider = null
ssl.secure.random.implementation = null
ssl.trustmanager.algorithm = PKIX
ssl.truststore.location = null
ssl.truststore.password = null
ssl.truststore.type = JKS
transaction.abort.timed.out.transaction.cleanup.interval.ms = 60000
transaction.max.timeout.ms = 900000
transaction.remove.expired.transaction.cleanup.interval.ms = 3600000
transaction.state.log.load.buffer.size = 5242880
transaction.state.log.min.isr = 1
transaction.state.log.num.partitions = 50
transaction.state.log.replication.factor = 1
transaction.state.log.segment.bytes = 104857600
transactional.id.expiration.ms = 604800000
unclean.leader.election.enable = false
zookeeper.connect = localhost:2181
zookeeper.connection.timeout.ms = 6000
zookeeper.max.in.flight.requests = 10
zookeeper.session.timeout.ms = 6000
zookeeper.set.acl = false
zookeeper.sync.time.ms = 2000
(kafka.server.KafkaConfig)
[2018-11-16 11:54:57,840] INFO [ThrottledChannelReaper-Fetch]: Starting (kafka.server.ClientQuotaManager$ThrottledChannelReaper)
[2018-11-16 11:54:57,841] INFO [ThrottledChannelReaper-Produce]: Starting (kafka.server.ClientQuotaManager$ThrottledChannelReaper)
[2018-11-16 11:54:57,843] INFO [ThrottledChannelReaper-Request]: Starting (kafka.server.ClientQuotaManager$ThrottledChannelReaper)
[2018-11-16 11:54:57,888] INFO Log directory /usr/local/var/lib/kafka-logs not found, creating it. (kafka.log.LogManager)
[2018-11-16 11:54:57,927] INFO Loading logs. (kafka.log.LogManager)
[2018-11-16 11:54:57,947] INFO Logs loading complete in 20 ms. (kafka.log.LogManager)
[2018-11-16 11:54:57,971] INFO Starting log cleanup with a period of 300000 ms. (kafka.log.LogManager)
[2018-11-16 11:54:57,979] INFO Starting log flusher with a default period of 9223372036854775807 ms. (kafka.log.LogManager)
[2018-11-16 11:54:58,520] INFO Awaiting socket connections on 0.0.0.0:9092. (kafka.network.Acceptor)
[2018-11-16 11:54:58,561] INFO [SocketServer brokerId=0] Started 1 acceptor threads (kafka.network.SocketServer)
[2018-11-16 11:54:58,595] INFO [ExpirationReaper-0-Produce]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2018-11-16 11:54:58,595] INFO [ExpirationReaper-0-Fetch]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2018-11-16 11:54:58,597] INFO [ExpirationReaper-0-DeleteRecords]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2018-11-16 11:54:58,618] INFO [LogDirFailureHandler]: Starting (kafka.server.ReplicaManager$LogDirFailureHandler)
[2018-11-16 11:54:58,659] INFO Creating /brokers/ids/0 (is it secure? false) (kafka.zk.KafkaZkClient)
[2018-11-16 11:54:58,663] INFO Result of znode creation at /brokers/ids/0 is: OK (kafka.zk.KafkaZkClient)
[2018-11-16 11:54:58,665] INFO Registered broker 0 at path /brokers/ids/0 with addresses: ArrayBuffer(EndPoint(192.168.5.32,9092,ListenerName(PLAINTEXT),PLAINTEXT)) (kafka.zk.KafkaZkClient)
[2018-11-16 11:54:58,668] WARN No meta.properties file under dir /usr/local/var/lib/kafka-logs/meta.properties (kafka.server.BrokerMetadataCheckpoint)
[2018-11-16 11:54:58,802] INFO [ExpirationReaper-0-topic]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2018-11-16 11:54:58,807] INFO Creating /controller (is it secure? false) (kafka.zk.KafkaZkClient)
[2018-11-16 11:54:58,808] INFO [ExpirationReaper-0-Heartbeat]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2018-11-16 11:54:58,809] INFO [ExpirationReaper-0-Rebalance]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2018-11-16 11:54:58,816] INFO Result of znode creation at /controller is: OK (kafka.zk.KafkaZkClient)
[2018-11-16 11:54:58,858] INFO [GroupCoordinator 0]: Starting up. (kafka.coordinator.group.GroupCoordinator)
[2018-11-16 11:54:58,860] INFO [GroupCoordinator 0]: Startup complete. (kafka.coordinator.group.GroupCoordinator)
[2018-11-16 11:54:58,866] INFO [GroupMetadataManager brokerId=0] Removed 0 expired offsets in 7 milliseconds. (kafka.coordinator.group.GroupMetadataManager)
[2018-11-16 11:54:58,899] INFO [ProducerId Manager 0]: Acquired new producerId block (brokerId:0,blockStartProducerId:0,blockEndProducerId:999) by writing to Zk with path version 1 (kafka.coordinator.transaction.ProducerIdManager)
[2018-11-16 11:54:58,932] INFO [TransactionCoordinator id=0] Starting up. (kafka.coordinator.transaction.TransactionCoordinator)
[2018-11-16 11:54:58,934] INFO [Transaction Marker Channel Manager 0]: Starting (kafka.coordinator.transaction.TransactionMarkerChannelManager)
[2018-11-16 11:54:58,949] INFO [TransactionCoordinator id=0] Startup complete. (kafka.coordinator.transaction.TransactionCoordinator)
[2018-11-16 11:54:59,038] INFO [/config/changes-event-process-thread]: Starting (kafka.common.ZkNodeChangeNotificationListener$ChangeEventProcessThread)
[2018-11-16 11:54:59,053] INFO [SocketServer brokerId=0] Started processors for 1 acceptors (kafka.network.SocketServer)
[2018-11-16 11:54:59,071] INFO Kafka version : 2.0.0 (org.apache.kafka.common.utils.AppInfoParser)
[2018-11-16 11:54:59,072] INFO Kafka commitId : 3402a8361b734732 (org.apache.kafka.common.utils.AppInfoParser)
[2018-11-16 11:54:59,078] INFO [KafkaServer id=0] started (kafka.server.KafkaServer)
4. 创建消息
进入kafka bin目录:
louie-mac:bin louiezhou$ ./kafka-console-producer --broker-list localhost:9092 --topic test
>
>test
>zhouzhou
>
5. 消费消息:
再到kafka consumer中去查看消息: 新启一个tab 同样进入bin目录, 将producer中创建的消息输出:
louie-mac:bin louiezhou$ cd /usr/local/Cellar/kafka/2.0.0/bin
louie-mac:bin louiezhou$ kafka-console-consumer --bootstrap-server localhost:9092 --topic test --from-beginning
test
zhouzhou
=============================================================================================
可以看到consumer中的消息输出与producer中创建的消息一致, 达到测试预期.
希望以上内容能够帮助到你, 解决实际问题, 如果文章对你有帮助请关注我的公众号并分享转发, 让更多的小伙伴一起学习成长.
推荐阅读
对应qq群号:616961231




浙公网安备 33010602011771号