# Apache Kafka (Confluent Cloud)

> Manage a Confluent Cloud Kafka cluster: list, create and delete topics, read and change topic settings, produce records, and list consumer groups.

App · 14 actions. Web page: https://docs.lodol.com/docs/integrations/confluent-kafka

## Actions

### Add partitions to topic

Raise a topic's partition count. Kafka never lowers it, and records already written stay where they are.

**Inputs**

- Topic (`topic_name`, text, required): The topic. Pick one, or type or chain its name.
- New partition count (`partitions_count`, number, required): The total to have, which must be more than it has now. From 1 to 100000.

**Outputs**

- `topic` (object): The topic

**Example output**

```json
{
  "topic": {
    "cluster_id": "lkc-abc123",
    "is_internal": false,
    "partitions_count": 12,
    "replication_factor": 3,
    "topic_name": "orders"
  }
}
```

### Create topic

Create a topic, or check that it could be created without creating it. The cluster chooses the replication factor.

**Inputs**

- Topic name (`topic_name`, text, required): Letters, digits, '.', '_' and '-' only.
- Partitions (`partitions_count`, number): How many partitions. Leave empty for the cluster's default. From 1 to 100000.
- Topic settings (`configs`, object): Settings for the new topic, each a name and a value, for example retention.ms = 604800000.
- Only check, don't create (`validate_only`, true/false): Run Confluent's checks and stop before creating the topic. Default: `false`.

**Outputs**

- `topic` (object): The topic
- `validated` (true/false): True if the topic was only checked, not created

**Example output**

```json
{
  "topic": {
    "cluster_id": "lkc-abc123",
    "is_internal": false,
    "partitions_count": 6,
    "replication_factor": 3,
    "topic_name": "orders"
  },
  "validated": false
}
```

### Delete topic

Delete a topic and every record in it. This cannot be undone.

**Inputs**

- Topic (`topic_name`, text, required): The topic. Pick one, or type or chain its name.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `topic_name` (text): The topic deleted

**Example output**

```json
{
  "deleted": true,
  "topic_name": "orders"
}
```

### Get cluster

Check the connection and get the cluster's id and Confluent resource name.

**Inputs**: None.

**Outputs**

- `cluster_id` (text): The cluster id
- `resource_name` (text): The cluster's Confluent resource name
- `rest_endpoint` (text): The REST endpoint

**Example output**

```json
{
  "cluster_id": "lkc-abc123",
  "resource_name": "crn://confluent.cloud/organization=1/environment=env-1/cloud-cluster=lkc-abc123/kafka=lkc-abc123",
  "rest_endpoint": "https://pkc-abc12.us-east-1.aws.confluent.cloud:443"
}
```

### Get partition

Get one partition of a topic.

**Inputs**

- Topic (`topic_name`, text, required): The topic. Pick one, or type or chain its name.
- Partition (`partition_id`, number, required): The partition number, starting at 0. From 0 to 100000.

**Outputs**

- `partition` (object): The partition

**Example output**

```json
{
  "partition": {
    "leader_broker_id": 1,
    "partition_id": 0,
    "topic_name": "orders"
  }
}
```

### Get topic

Get a topic's partition count and replication factor.

**Inputs**

- Topic (`topic_name`, text, required): The topic. Pick one, or type or chain its name.

**Outputs**

- `topic` (object): The topic

**Example output**

```json
{
  "topic": {
    "cluster_id": "lkc-abc123",
    "is_internal": false,
    "partitions_count": 6,
    "replication_factor": 3,
    "topic_name": "orders"
  }
}
```

### Get topic setting

Get one setting of a topic.

**Inputs**

- Topic (`topic_name`, text, required): The topic. Pick one, or type or chain its name.
- Setting name (`config_name`, text, required): The topic setting, such as retention.ms or cleanup.policy.

**Outputs**

- `config` (object): The setting
- `topic_name` (text): The topic

**Example output**

```json
{
  "config": {
    "is_default": true,
    "is_read_only": false,
    "is_sensitive": false,
    "name": "retention.ms",
    "source": "DEFAULT_CONFIG",
    "value": "604800000"
  },
  "topic_name": "orders"
}
```

### List consumer groups

List the cluster's consumer groups, optionally by state or name.

**Inputs**

- State (`state`, text): Only groups in this state. Leave empty for all. One of: `STABLE` (Stable (members are consuming)), `EMPTY` (Empty (no members)), `PREPARING_REBALANCE` (Preparing to rebalance), `COMPLETING_REBALANCE` (Completing a rebalance), `ASSIGNING` (Assigning partitions), `RECONCILING`, `DEAD`.
- Name contains (`name_contains`, text): Only those whose name contains this text. Leave empty for all.

**Outputs**

- `consumer_groups` (list): The consumer groups
- `count` (number): How many

**Example output**

```json
{
  "consumer_groups": [
    {
      "consumer_group_id": "billing-service",
      "is_mixed_consumer_group": false,
      "is_simple": false,
      "partition_assignor": "uniform",
      "state": "STABLE",
      "type": "CLASSIC"
    }
  ],
  "count": 1
}
```

### List partitions

List a topic's partitions and the broker leading each.

**Inputs**

- Topic (`topic_name`, text, required): The topic. Pick one, or type or chain its name.

**Outputs**

- `count` (number): How many
- `partitions` (list): The partitions
- `topic_name` (text): The topic

**Example output**

```json
{
  "count": 1,
  "partitions": [
    {
      "leader_broker_id": 1,
      "partition_id": 0,
      "topic_name": "orders"
    }
  ],
  "topic_name": "orders"
}
```

### List topic settings

List every setting of a topic with its value and whether it is the default.

**Inputs**

- Topic (`topic_name`, text, required): The topic. Pick one, or type or chain its name.
- Name contains (`name_contains`, text): Only those whose name contains this text. Leave empty for all.

**Outputs**

- `configs` (list): The settings
- `count` (number): How many
- `topic_name` (text): The topic

**Example output**

```json
{
  "configs": [
    {
      "is_default": true,
      "is_read_only": false,
      "is_sensitive": false,
      "name": "retention.ms",
      "source": "DEFAULT_CONFIG",
      "value": "604800000"
    }
  ],
  "count": 1,
  "topic_name": "orders"
}
```

### List topics

List the cluster's topics, optionally only those whose name contains some text.

**Inputs**

- Name contains (`name_contains`, text): Only those whose name contains this text. Leave empty for all.
- Include internal topics (`include_internal`, true/false): Also list Kafka's own internal topics, such as __consumer_offsets. Default: `false`.

**Outputs**

- `count` (number): How many
- `topics` (list): The topics

**Example output**

```json
{
  "count": 1,
  "topics": [
    {
      "cluster_id": "lkc-abc123",
      "is_internal": false,
      "partitions_count": 6,
      "replication_factor": 3,
      "topic_name": "orders"
    }
  ]
}
```

### Produce record

Write one record to a topic and get the partition and offset it landed at. Running it twice writes two records.

**Inputs**

- Topic (`topic_name`, text, required): The topic. Pick one, or type or chain its name.
- Value (`value`, text): The record's contents. Give a value, a key, or both.
- Value format (`value_format`, text): How to read the value. JSON must be valid JSON; binary must be base64. One of: `STRING` (Text (default)), `JSON`, `BINARY` (Binary (as base64 text)). Default: `STRING`.
- Key (`key`, text): The record's key. Records with the same key go to the same partition.
- Key format (`key_format`, text): How to read the key. One of: `STRING` (Text (default)), `JSON`, `BINARY` (Binary (as base64 text)). Default: `STRING`.
- Partition (`partition_id`, number): Send to this partition. Leave empty to let Kafka choose from the key. From 0 to 100000.
- Headers (`headers`, object): Your own header names and text values to attach to the record.
- Timestamp (`timestamp`, date and time): The record's time. Leave empty to use the time it is received.

**Outputs**

- `key_size` (number): Bytes in the key
- `offset` (number): The record's offset
- `partition_id` (number): The partition
- `timestamp` (text): The record's time
- `topic_name` (text): The topic written to
- `value_size` (number): Bytes in the value

**Example output**

```json
{
  "key_size": 5,
  "offset": 42,
  "partition_id": 0,
  "timestamp": "2026-11-03T12:00:00.000Z",
  "topic_name": "orders",
  "value_size": 17
}
```

### Reset topic setting

Put one setting of a topic back to the cluster's default.

**Inputs**

- Topic (`topic_name`, text, required): The topic. Pick one, or type or chain its name.
- Setting name (`config_name`, text, required): The topic setting, such as retention.ms or cleanup.policy.

**Outputs**

- `config_name` (text): The setting reset
- `reset` (true/false): Always true once reset
- `topic_name` (text): The topic

**Example output**

```json
{
  "config_name": "retention.ms",
  "reset": true,
  "topic_name": "orders"
}
```

### Set topic settings

Change one or more settings of a topic together. Settings not named stay as they are.

**Inputs**

- Topic (`topic_name`, text, required): The topic. Pick one, or type or chain its name.
- Topic settings (`configs`, object, required): Settings to apply, each a name and a value, for example retention.ms = 604800000 or cleanup.policy = compact.

**Outputs**

- `count` (number): How many
- `topic_name` (text): The topic
- `updated` (list): Names of the settings changed

**Example output**

```json
{
  "count": 1,
  "topic_name": "orders",
  "updated": [
    "retention.ms"
  ]
}
```
