Skip to content
Download

Kafka requests

Produce a record, stream from selected partitions and inspect Kafka values and metadata.

A Kafka request either produces a record to a topic or reads records from topics, so you can check what a service publishes or feed it test data without writing a client.

Choose Kafka in the protocol picker and enter one or more comma-separated bootstrap brokers, such as localhost:9092. Test connection lists the topics your credentials can see. Broker addresses, the topic and message fields accept workspace variables.

For encrypted or protected brokers, see Connections, schemas and scripts.

  1. Choose Produce and enter a topic.
  2. Write the value and pick its format: JSON, text, hex or base64. Beautify formats a JSON value. Choose tombstone to send a null value.
  3. Optionally add a key (text, JSON, hex or base64), a partition and record headers in Headers.
  4. Click Produce.

The records list shows the record’s time, topic, partition, offset, key and value. Next to it, Value, Key, Headers and Metadata show each part of the selected record; Metadata holds the topic, partition, offset and timestamp.

Kafka producer with a JSON order message and the broker receipt

A key lets the broker client pick a partition consistently; an explicit partition overrides it. Acknowledgements controls whether the producer waits for the leader or all in-sync replicas. Compression in Settings picks the codec for produced batches: none, gzip, snappy, lz4 or zstd.

Saved keeps records you produce often: a name, the topic, the key with its format, and the value with its format. Load one, or produce it straight away.

  1. Choose Consume, test the connection and select topics. You can also type a topic, or a regular expression beginning with ^.
  2. Choose where to start: Earliest for existing records, Latest for new arrivals, or an offset or timestamp.
  3. Choose when to stop: after a record count, a duration, an idle period, or at a timestamp.
  4. Click Consume, then select a record to inspect its value or metadata. Stop keeps the records already received.

Kafka consumer with a selected orders topic and its record value

Click a selected topic to read only some partitions, or to set a starting offset or an exclusive end offset. Kurlo reads those partitions directly and does not commit consumer-group offsets.

The header above the records counts them and their size, filters them by topic, searches keys, values and offsets, and clears the list or restores it, as in the WebSocket message log.

TLS and auth. Enable TLS in Settings for encrypted brokers, and select a client certificate for mutual TLS. In Auth, choose SASL credentials for PLAIN or SCRAM, a bearer or OAuth 2.0 access token for OAUTHBEARER, or AWS credentials for MSK IAM.

AsyncAPI. To start from a spec, import an AsyncAPI document: Kurlo builds producers and consumers with example messages and links the document as their schema.

Schemas. Link a local JSON Schema or an AsyncAPI JSON or YAML file to the producer message or to a single subscription. For AsyncAPI, Kurlo matches the topic to the channel and validates the JSON value against its message payload. A producer checks the message before sending it and does not send a message that breaks the schema; unlink the schema to send such a message on purpose. Received records are checked as they arrive and are kept even when they do not match. Metadata shows the validation details.

Scripts. Use Scripts to prepare a request and assert on the result. A consumer’s on-message script runs for each record:

pm.test("order has an id", () => pm.expect(pm.message.value.id).to.exist)

After consuming, pm.response.messages contains the received records. Save the request to reuse the same settings in the Collection Runner or with kurlo run.

  • Acknowledgements: None. The broker does not return an offset.
  • Binary data that cannot be displayed as UTF-8 appears as base64.
  • Formats. Durations are in milliseconds. Timestamps accept RFC 3339 or Unix milliseconds.
  • Timeout. The request timeout in Settings covers connecting to the brokers and looking up partitions. After that the consumer can wait for new records until its stop condition.
  • Runs without a Stop button. In the Collection Runner, kurlo run and MCP tools, a consumer that stops after a record count also stops when no record arrives within the request timeout, and keeps what arrived.
  • Early errors. Kurlo checks the brokers and the sign-in first, so a wrong address, TLS setting or SASL password is reported at once.
  • Run size. A run holds up to 10,000 records and 16 MiB of record data.
  • Storage. Saved records are stored in the request’s kafka block.