Book Image

Apache Kafka Cookbook

By : Saurabh Minni
Book Image

Apache Kafka Cookbook

By: Saurabh Minni

Overview of this book

<p>This book will give you details about how to manage and administer your Apache Kafka Cluster.</p> <p>We will cover topics like how to configure your broker, producer, and consumer for maximum efficiency for your situation. Also, you will learn how to maintain and administer your cluster for fault tolerance. We will also explore tools provided with Apache Kafka to do regular maintenance operations. We shall also look at how to easily integrate Apache Kafka with big data tools like Hadoop, Apache Spark, Apache Storm, and Elasticsearch.</p>
Table of Contents (15 chapters)
Apache Kafka Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Configuring other miscellaneous parameters


Besides the earlier mentioned configurations, there are some other configurations that also need to be set.

Getting ready

Just open the server.properties file in your favorite editor.

How to do it...

We will look at the default values of the properties as follows:

  1. Set auto.create.topics.enable:

    auto.create.topics.enable=true
    
  2. Set controlled.shutdown.enable:

    controlled.shutdown.enable=true
    
  3. Set controlled.shutdown.max.retries:

    controlled.shutdown.max.retries=3
    
  4. Set controlled.shutdown.retry.backoff.ms:

    controlled.shutdown.retry.backoff.ms=5000
    
  5. Set auto.leader.rebalance.enable:

    auto.leader.rebalance.enable=true
    
  6. Set leader.imbalance.per.broker.percentage:

    leader.imbalance.per.broker.percentage=10
    
  7. Set leader.imbalance.check.interval.seconds:

    leader.imbalance.check.interval.seconds=300
    
  8. Set offset.metadata.max.bytes:

    offset.metadata.max.bytes=4096
    
  9. Set max.connections.per.ip:

    max.connections.per.ip=Int.MaxValue
    
  10. Set connections.max.idle.ms:

    connections.max.idle...