> This page is for Postman Docs, version Latest (v12) (default).
> For other versions, use one of these documentation indexes:
> - Latest (v12) (default): https://learning.postman.com/latest-v-12/llms.txt
> - v11: https://learning.postman.com/v11/llms.txt

> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt.

# Manage Kafka APIs using Postman

Postman can make requests using Kafka, a distributed event-streaming platform used for publishing and consuming ordered, replayable streams of records across producers and consumers. Kafka requests can produce a message to a topic, consume messages from a topic with a bounded stop condition, and inspect the payload, headers, and key of each message, without writing your own consumer or producer code.

A Kafka request in Postman operates in one of two modes:

* **Producer**: sends one or more messages to a topic. You can compose the message value, key, and headers, and reuse [variables](/docs/use/send-requests/variables/variables/) from earlier steps in a run.
* **Consumer**: subscribes to one or more topics and reads messages until a stop condition is met. Because a live topic is an unbounded stream, every consumer request in Postman runs as a **bounded consume**: it stops after one configured bound, such as a message count, duration, idle timeout, or timestamp. See [Create and configure a Kafka request](/docs/use/send-requests/protocols/kafka/kafka-request-interface/) for how to set `stopAfter`.

You can also generate a Kafka collection directly from an AsyncAPI specification in [Spec Hub](/docs/design-apis/specifications/generate-kafka-collection-from-asyncapi/), with brokers, topics, and example payloads already filled in from the spec.

> **Info**
>
> Kafka requests support JSON message payloads. Avro and protobuf (protocol buffers) aren't supported yet.

## What you can do with a Kafka request

* [Create and configure a Kafka request](/docs/use/send-requests/protocols/kafka/kafka-request-interface/): set up brokers, authentication, topics, and bounded consume settings.
* [Validate messages against a schema](/docs/use/send-requests/protocols/kafka/kafka-schema-registry/): link a topic or message to an AsyncAPI schema so Postman can flag missing fields or type mismatches as you produce and consume.
* [Write scripts for Kafka requests](/docs/use/send-requests/protocols/kafka/scripting-in-kafka-request/): use the **Before produce**, **After produce**, **Before consume**, **On message**, and **After consume** hooks to read and write variables, edit the request before it runs with `pm.request`, read each consumed message's content with `pm.message`, and assert on produce and consume results with `pm.response`.
* Mix Kafka steps with HTTP (and other protocol) steps in a single collection run, passing variables across protocols in one sequence.
* Run the same mixed-protocol collection headlessly with the [Postman CLI](/docs/postman-cli/postman-cli-collections/) as a CI gate.