Kafka Producer: Sending Messages to a Topic
Send one record or a batch, produce records from a file, or run a timed loop from the topic tab you are inspecting.
What is a Kafka producer?
A Kafka producer publishes records to Kafka topics. It serializes each key and value, chooses a partition, and uses producer acks to control when a send is considered complete.
Apache Kafka includes kafka-console-producer for sending records from a terminal. Kafma keeps the same workflow next to the messages you are inspecting.
Kafma puts the Kafka producer and consumer in the same Console tab. Expand the producer to send test records, collapse it to focus on incoming messages, or leave a loop running while you inspect another tab or page in the same cluster. This keeps producing, consuming, and debugging in one workflow.
Send a Kafka message with a key and headers
Expand the producer and choose an encoding for the KEY and VALUE. Each side supports String, JSON, Bytes, UUID, Boolean, numeric types, and Null.
Enter the payload, add any key-value headers, then click Produce. Use Live to see the new record arrive in the stream above. New records do not appear automatically in a snapshot; refresh it after sending.
Null and an empty value are different in Kafka. Choose the Null encoding when you intend to send a tombstone rather than an empty payload.

Produce a batch
In Manual, enter the number of records to produce (1–100,000), then click Produce. A value of 1 sends a single record.
Enable auto-regeneration for KEY or VALUE to generate a new value for each record. Schema-bound fields generate schema-valid values; other fields generate random values for the selected encoding.
Click Cancel to stop the batch. Records already produced remain on the topic, and Kafma shows how many were sent.
Use this for test data, not load testing.
Produce from a file
Available with Pro. Compare plans.
Click File, choose the KEY and VALUE encodings, then click Choose file and select a .csv, .json, or .jsonl file.
Every record needs key and value. Optional fields are headers, timestamp, and partition. JSON accepts one record object or an array of record objects. JSONL uses one record object per line. CSV requires a header row.
In JSON and JSONL, quote large integer IDs. Kafma rejects unquoted integers that could lose precision.
Files can contain up to 100,000 records and be up to 256 MiB. Kafma previews up to three valid records and shows how many are ready. If any rows are invalid, Export failed rows saves them with the validation error.
Click Produce to send the valid records. Progress and cancellation work like a Manual batch: records already produced remain on the topic.

Produce Avro, Protobuf, and JSON Schema messages
The kafka-avro-console-producer and kafka-protobuf-console-producer commands send schema-encoded records from a terminal. In Kafma, a topic with matching Schema Registry subjects binds its key and value automatically.
Enter the message as JSON. Kafma validates it against the selected Avro, Protobuf, or JSON Schema, then serializes it with the schema ID consumers need to decode it. You can choose another subject manually, select a schema version, and select the Protobuf message type when a schema defines more than one.

Click Generate to create a sample from the active schema. To validate a payload without sending it, use Schema Lab.
Choose a partition and producer acks
Leave Partition on Auto to let the partitioner route the message, using its key when present. Select a specific partition when you need to reproduce partition-specific behavior.
Acks controls when the send is considered complete:
- All waits for all in-sync replicas and is the default.
- Leader waits only for the partition leader.
- None does not wait for a broker acknowledgment, so no reliable offset is returned.
Choose producer compression
Click Producer settings, choose Compression, then select None, GZIP, Snappy, LZ4, or ZSTD. The choice applies to every produce mode. Use a codec supported by your Kafka brokers and consumers.

Generate Kafka test messages on a loop
Switch to Loop, set the interval, then click Run Loop. By default, every tick resends the current key, value, and headers. Enable auto-regeneration for KEY or VALUE independently when each message should be different.
With auto-regeneration enabled, a schema-bound field generates a schema-compatible value on each tick; an unbound field generates a random value for its selected encoding. The producer shows the sent count while the loop is running.
A running loop continues when you switch Console tabs or open another page for the same cluster. Return to the tab to check the sent count or stop it. Closing the tab or disconnecting the cluster stops the loop.

Loop is for generating repeatable test messages, not throughput benchmarking. Stop it when the test is complete.