liveBook · Manning

Kafka-console-consumer

As explained in Troubleshooting Java, Second Edition

kafka-console-consumer is a Kafka command-line tool that reads and displays records from Kafka topics.

kafka-console-consumer is a Kafka command-line tool for inspecting topic records, replaying missed events, and checking whether consumers behave correctly. section 13.2.2

Use it during an event-driven incident to replace guesses with observable evidence:

  • Inspect the Kafka event log when a service appears to have missed messages. section 13.2.2
  • Check whether incorrect offsets, topics, or partitions explain missing or invisible records. section 13.2.2
  • After correcting configuration, replay missed events in a safe local environment and verify the consumer response. section 13.2.2

Wrong topic, not lost messages

An Email Service appeared not to send expected emails. Inspection showed that a deployment configured it for the wrong Kafka topic, so the events remained unconsumed. Replaying the missed events with Kafka's console tools made the service process them and confirmed the diagnosis. section 13.2.2

Figure 13.6 A developer can choose to replay events to troubleshoot a certain scenario.
A screenshot of a computer

AI-generated content may be incorrect.

Shows event replay as a troubleshooting choice for a specific scenario. section 13.2.2

How Troubleshooting Java, Second Edition covers it

How deep it goes
Explains its troubleshooting role and replay workflow, but gives no command syntax or option-level details.
Examples
Uses an Email Service configured for the wrong topic, then validates recovery by replaying its missed events.
What you can do after
Diagnose/debug with it by inspecting Kafka records and validating a consumer after correcting topic configuration.
How it connects
Connects Kafka topics, partitions, offsets, event logs, consumer groups, message replay, and kafka-console-producer.

Also explained in

Compare how 2 books explain kafka-console-consumer →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Troubleshooting Java, Second Edition. The section links point to the parts of the book it draws on.