Read messages
Read new messages from one or more topics as a consumer group, so the next read carries on where this one stopped. Needs a REST Proxy that supports consumer instances (self-managed Confluent REST Proxy).
Command in the Kafka toolkit · id ooa.kafka/read_messages · 12 inputs (2 required), 4 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Endpoint address | String | No | Kafka REST Proxy address, e.g. https://pkc-12345.us-east-1.aws.confluent.cloud:443 or http://kafka-rest.internal:8082. | |
| Topics | List | Yes | Topics to read, e.g. ["orders"]. | |
| Consumer group | String | Yes | Reader group name. Agents with the same group share the work and never get the same message twice. | |
| Maximum messages | Number | No | 100 | Stop once this many messages have arrived. The last batch is kept whole, so a few more can come back. |
| Wait (seconds) | Number | No | 10 | Stop when no new message arrives within this time. |
| Value format | String | No | json | Read values as JSON or as plain text. |
| Start from | String | No | earliest | For a new group only: start at the oldest message kept (earliest) or only new messages (latest). |
| Mark as read | Boolean | No | true | Remember what was read so the group does not read it again. |
| API key | String | No | API key or user name, used with api_secret. | |
| API secret | Credential | No | API secret or password from the vault. | |
| Access token | Credential | No | Bearer token from the vault, used instead of an API key and secret. | |
| CSV file | File | No | Also save the messages read to this CSV file (topic, partition, offset, key, value), replacing it; no file when empty (G6). |
Outputs
| Output | Type | What it is |
|---|---|---|
| table | Table | Columns: topic, partition, offset, key, value. JSON values are shown as text. |
| messages | List | Each message as a dictionary; JSON values stay structured. |
| count | Number | Number of messages read. |
| csv_file | File | The CSV file written; empty when csv_file was not given (G6). |