liveBook · Manning

Kafka client library

As explained in Apache Kafka in Action

A Kafka client library is a language-specific software library that lets applications communicate with Kafka brokers.

A Kafka client library lets an application communicate with Kafka brokers. Kafka supports client libraries across languages, so producer and consumer applications can integrate with Kafka without being written in Scala or Java. section 1.4

Choose a client according to the application runtime and the features required:

  • Use the official Kafka Java library for producers running on the Java Virtual Machine. section 8.1
  • Use a library based on librdkafka when the producer does not run in the JVM. section 8.1
  • Treat library selection as an operational choice: alternative libraries may be easier to use but can lack features and optimizations. section 8.1

The library carries much of the producer workflow, including serialization, partitioning, buffer management, acknowledgments, timeouts, and retries. Kafka brokers then receive produce requests and persist the data efficiently. section 8.5

A non-JVM producer

A producer application written outside the JVM can communicate with Kafka through a librdkafka-based library; Python examples illustrate the same basic communication concepts used in Java and other languages. section 8.1

How Apache Kafka in Action covers it

How deep it goes
Explains library choices and producer responsibilities, but stops short of a comprehensive developer guide.
Examples
Uses the official Kafka Java library, librdkafka-based libraries, and Python code examples to illustrate client integration.
What it assumes
Assumes a Kafka application and a programming language, while distinguishing JVM-based from non-JVM client choices.
What you can do after
Apply it via the official Kafka Java library or a librdkafka-based library to build producer and consumer applications.
How it connects
Connects producers and consumers with Kafka brokers, serialization, partitioning, buffer management, acknowledgments, and retries.

Also explained in

Compare how 2 books explain Kafka client library →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Apache Kafka in Action. The section links point to the parts of the book it draws on.