O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Apache Kafka

Book Description

Apache Kafka is the platform that handles real-time data feeds with a high-throughput, and this book is all you need to harness its power, quickly and painlessly. A step by step tutorial with a practical approach.

  • Write custom producers and consumers with message partition techniques

  • Integrate Kafka with Apache Hadoop and Storm for use cases such as processing streaming data

  • Provide an overview of Kafka tools and other contributions that work with Kafka in areas such as logging, packaging, and so on

  • In Detail

    Message publishing is a mechanism of connecting heterogeneous applications together with messages that are routed between them, for example by using a message broker like Apache Kafka. Such solutions deal with real-time volumes of information and route it to multiple consumers without letting information producers know who the final consumers are.

    Apache Kafka is a practical, hands-on guide providing you with a series of step-by-step practical implementations, which will help you take advantage of the real power behind Kafka, and give you a strong grounding for using it in your publisher-subscriber based architectures.

    Apache Kafka takes you through a number of clear, practical implementations that will help you to take advantage of the power of Apache Kafka, quickly and painlessly. You will learn everything you need to know for setting up Kafka clusters. This book explains how Kafka basic blocks like producers, brokers, and consumers actually work and fit together. You will then explore additional settings and configuration changes to achieve ever more complex goals. Finally you will learn how Kafka works with other tools like Hadoop, Storm, and so on.

    You will learn everything you need to know to work with Apache Kafka in the right format, as well as how to leverage its power of handling hundreds of megabytes of messages per second from multiple clients.

    Table of Contents

    1. Table of Contents
    2. Apache Kafka
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the color images of this book
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Introducing Kafka
      1. Need for Kafka
      2. Few Kafka usages
      3. Summary
    9. 2. Installing Kafka
      1. Installing Kafka
        1. Downloading Kafka
        2. Installing the prerequisites
          1. Installing Java 1.6 or later
        3. Building Kafka
      2. Summary
    10. 3. Setting up the Kafka Cluster
      1. Single node – single broker cluster
        1. Starting the ZooKeeper server
        2. Starting the Kafka broker
        3. Creating a Kafka topic
        4. Starting a producer for sending messages
        5. Starting a consumer for consuming messages
      2. Single node – multiple broker cluster
        1. Starting ZooKeeper
        2. Starting the Kafka broker
        3. Creating a Kafka topic
        4. Starting a producer for sending messages
        5. Starting a consumer for consuming messages
      3. Multiple node – multiple broker cluster
      4. Kafka broker property list
      5. Summary
    11. 4. Kafka Design
      1. Kafka design fundamentals
      2. Message compression in Kafka
      3. Cluster mirroring in Kafka
      4. Replication in Kafka
      5. Summary
    12. 5. Writing Producers
      1. The Java producer API
      2. Simple Java producer
        1. Importing classes
        2. Defining properties
        3. Building the message and sending it
      3. Creating a simple Java producer with message partitioning
        1. Importing classes
        2. Defining properties
        3. Implementing the Partitioner class
        4. Building the message and sending it
      4. The Kafka producer property list
      5. Summary
    13. 6. Writing Consumers
      1. Java consumer API
        1. High-level consumer API
        2. Simple consumer API
      2. Simple high-level Java consumer
        1. Importing classes
        2. Defining properties
        3. Reading messages from a topic and printing them
      3. Multithreaded consumer for multipartition topics
        1. Importing classes
        2. Defining properties
        3. Reading the message from threads and printing it
      4. Kafka consumer property list
      5. Summary
    14. 7. Kafka Integrations
      1. Kafka integration with Storm
        1. Introduction to Storm
        2. Integrating Storm
      2. Kafka integration with Hadoop
        1. Introduction to Hadoop
        2. Integrating Hadoop
        3. Hadoop producer
        4. Hadoop consumer
      3. Summary
    15. 8. Kafka Tools
      1. Kafka administration tools
        1. Kafka topic tools
        2. Kafka replication tools
      2. Integration with other tools
      3. Kafka performance testing
      4. Summary
    16. Index