> 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.

# Run mixed HTTP and Kafka collections

A single [collection run](/docs/tests-and-scripts/running-collections/intro-to-collection-runs/) can mix Kafka steps with other collection types in one sequence, so you can assert on what a system actually did across protocols in one pass. For example, calling an HTTP endpoint that triggers an async side effect, then consuming a Kafka topic to confirm the event it should have produced actually arrived.

## Step order in a mixed-protocol run

Each step in the run completes before the next one starts, in the order they appear in the collection. No two steps run concurrently or in parallel, so a Kafka consume step and an HTTP step can't run at the same time within one run.

For example, a run like this:

1. **HTTP** `POST /orders` → returns an order ID, stored as an environment variable.
2. **Kafka consume** `orders.created` (bounded) → asserts an event for that order ID arrived within the bound.
3. **Kafka produce** `payments.completed` → simulates the downstream payment service.
4. **HTTP** `GET /orders/{orderId}` → asserts the order's state is now `"paid"`.
5. **Kafka consume** `notifications.sent` (bounded) → asserts the notification fired.

Each step runs to completion before the run advances to the next step. For a Kafka consume step, that means waiting out its `stopAfter` bound (records, duration, idle timeout, or timestamp) before the run moves on. There's no way to end a consume step from a script. See [Bounded consume runs to its configured stop condition](/docs/use/send-requests/protocols/kafka/scripting-in-kafka-request/#bounded-consume-runs-to-its-configured-stop-condition).

## Pass variables across protocols

Because Kafka requests use the same [variable scopes](/docs/use/send-requests/variables/variables/) as HTTP requests, a script in one step can set a variable that a later step, of either protocol, reads:

* An HTTP request's script calls `pm.environment.set("orderId", pm.response.json().orderId)`.
* A later Kafka consume step's **Before consume** or **On message** script can read it back with `pm.environment.get("orderId")`, or an HTTP or Kafka step further down the run can reference it directly as `{{orderId}}`.

See [Cross-protocol variable passing](/docs/use/send-requests/protocols/kafka/scripting-in-kafka-request/#cross-protocol-variable-passing) for more on the scripting side of this.

## Run in CI

The same mixed-protocol collection runs headlessly with the [Postman CLI](/docs/postman-cli/postman-cli-collections/), so a run like the order, payment, and notification example earlier on this page can be a pull request gate rather than only a manual UI run. See [Generate collection run reports using the Postman CLI](/docs/postman-cli/postman-cli-reporters/) for current reporter support across protocols.