Reader small image

You're reading from  Apache Kafka 1.0 Cookbook

Product typeBook
Published inDec 2017
Reading LevelIntermediate
PublisherPackt
ISBN-139781787286849
Edition1st Edition
Languages
Tools
Right arrow
Authors (2):
Raúl Estrada
Raúl Estrada
author image
Raúl Estrada

Raúl Estrada has been a programmer since 1996 and a Java developer since 2001. He loves all topics related to computer science. With more than 15 years of experience in high-availability and enterprise software, he has been designing and implementing architectures since 2003. His specialization is in systems integration, and he mainly participates in projects related to the financial sector. He has been an enterprise architect for BEA Systems and Oracle Inc., but he also enjoys web, mobile, and game programming. Raúl is a supporter of free software and enjoys experimenting with new technologies, frameworks, languages, and methods. Raúl is the author of other Packt Publishing titles, such as Fast Data Processing Systems with SMACK and Apache Kafka Cookbook.
Read more about Raúl Estrada

View More author details
Right arrow

Running Kafka


This is the second step. This recipe shows how to test the Apache Kafka installation.

Getting ready

Go to the Kafka installation directory (/usr/local/kafka/ for Mac users and /opt/kafka/ for Linux users):

> cd /usr/local/kafka

How to do it...

  1. First of all, we need to run Zookeeper (sorry, the Kafka dependency on Zookeeper is still very strong):
 zkServer start

You will get the following result:

ZooKeeper JMX enabled by default
Using config: /usr/local/etc/zookeeper/zoo.cfg
Starting zookeeper ... STARTED
  1. To check if Zookeeper is running, use the lsof command over the port 9093 (default port):
 > lsof -i :9093

You will get the following output:

COMMAND   PID   USER   FD   TYPE            DEVICE SIZE/OFF NODE NAME
java   17479 admin1   97u IPv6 0xcfbcde96aa59c3bf     0t0 TCP *:9093 (LISTEN)
  1. Now run the Kafka server that comes with the installation; go to /usr/local/kafka/ for Mac users and /opt/kafka/ for Linux users, as follows:
 > ./bin/kafka-server-start.sh /config/server.properties

Now there is an Apache Kafka broker running on your machine.

There's more...

Remember that Zookeeper must be running on the machine before you start Kafka. If you don't want to start Zookeeper every time you need to run Kafka, install it as an operating system autostart service.

See also

Previous PageNext Page
You have been reading a chapter from
Apache Kafka 1.0 Cookbook
Published in: Dec 2017Publisher: PacktISBN-13: 9781787286849
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Raúl Estrada

Raúl Estrada has been a programmer since 1996 and a Java developer since 2001. He loves all topics related to computer science. With more than 15 years of experience in high-availability and enterprise software, he has been designing and implementing architectures since 2003. His specialization is in systems integration, and he mainly participates in projects related to the financial sector. He has been an enterprise architect for BEA Systems and Oracle Inc., but he also enjoys web, mobile, and game programming. Raúl is a supporter of free software and enjoys experimenting with new technologies, frameworks, languages, and methods. Raúl is the author of other Packt Publishing titles, such as Fast Data Processing Systems with SMACK and Apache Kafka Cookbook.
Read more about Raúl Estrada