How to list all producers of a Kafka cluster
Codemia Knowledge Hub ·
Kafka has no built-in command or API that lists the producer applications writing to a cluster. Brokers treat incoming data as streams and keep no explicit record of which client sent it, unlike the way they track consumers. Since Kafka 3.0 the Admin API's describeProducers() returns the active idempotent and transactional producer IDs per partition, but not client IDs or hosts. You can still identify producers indirectly, using the four methods below.
What a producer looks like to the broker
A Kafka producer is any application or process that sends messages to Kafka topics. Each message has a key, a value and a timestamp. Producers send data to brokers, and the brokers handle storage and replication across the cluster.
1. Inspect client connections on the brokers
Network tools on a broker host show which clients are connected right now. On Linux, use netstat:
:9092 is the default Kafka broker port. The output lists the IP addresses connected to the broker.
2. Turn on the broker request log
A broker at the default INFO level does not log client connections, so its normal logs will not show producers. The request logger does: at DEBUG it writes one Completed request line per request to kafka-request.log, with the clientId, the API name (PRODUCE, INIT_PRODUCER_ID), the topic and the client address in the connection field. You can switch it on at runtime without a restart:
It logs every request, so it grows fast on a busy broker. Set it back to WARN once you have what you need.
3. Query producer metrics over JMX
Give each producer its own client ID. You can then query the JMX (Java Management Extensions) metrics with jConsole or another JMX client to get statistics per producer:
The result contains performance and health metrics for the producer identified by client_id. This MBean lives in each producer's own JVM, not on the broker, so it helps you inspect producers you already know about rather than discover them.
4. Describe active producers with the Admin API
Admin.describeProducers() (Kafka 3.0+) asks the partition leader for its active idempotent and transactional producers. Since Kafka 3.0 producers are idempotent by default, so this covers most modern clients:
The same data is available from the command line:
After two console-producer runs against a test topic, it printed:
You get producer IDs, not client IDs or hosts, so pair this with the request log (method 2) when you need to know which application a producer ID belongs to.
Comparing the methods
| Method | Description | Pros | Cons |
| Examine Client Connections | Use networking tools to inspect connections on Kafka broker ports. | Quick and straightforward | Only shows active connections |
| Broker Request Log | Enable kafka.request.logger at DEBUG and read client IDs from PRODUCE requests. | Names client ID and address | Very verbose; must be enabled first |
| Kafka Producer Metric | Utilize JMX to fetch metrics about Kafka producers with a specific client ID. | Detailed metrics per producer | Lives in the producer JVM; you must already know the producer |
| Admin describeProducers | Admin.describeProducers() or kafka-transactions.sh describe-producers per partition. | Lists active producer IDs from the broker | IDs only, no client ID or host; idempotent and transactional producers only |
In practice, combining describeProducers, the request log and network monitoring gives the most complete picture of which producers talk to your cluster.
Related reading
- How to list Kafka consumer group using python
- How to list producers in kafka
- How To Load-Distribution in RabbitMQ cluster?
- how to load a Kafka topic to HDFS?
- How to load balance the Kafka Leadership?
- How to make consume method as non blocking in confluent kafka for dot net
- How to make fanout in Apache Kafka?
- How to make kafka consumer to read from last consumed offset but not from beginning
System design interview problems on this topic
- Design a Distributed Messaging System: solution and walkthrough
- Design a Log Collection and Analysis System: solution and walkthrough
- Design an Ad Click Aggregation System: solution and walkthrough
- Design a Webhook Notification Service: solution and walkthrough

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseSystem Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.