---
title: c Kafka
description: Available connectors
documentId: ipaas-kafka
locale: en-US
---

The [**Kafka**](https://camel.apache.org/components/4.10.x/kafka-component.html) component is used for communication with Apache Kafka message broker.

**URI Syntax**: `kafka:topic`

## Main fields

*Path parameters*

| **Name** | **Description** | **Default** | **Type** |
|----------|---------------|------------|----------|
| `topic` (common) | (required) Topic name to be used. In the consumer (trigger), you can use commas to separate multiple topics. A producer (connector) can only send messages to a single topic. | —  | String |

*Query parameters*

| **Name** | **Description** | **Default** | **Type** |
|----------|---------------|------------|----------|
| `brokers` (common) | URL of the Kafka brokers to be used. The format is `host1:port1,host2:port2`, and the list can be a subset of brokers or a VIP pointing to a subset of brokers. This option is known as `bootstrap.servers` in Kafka documentation. | —  | String |
| `topicIsPattern` (consumer) | Defines whether the topic is a pattern (regular expression). This can be used to subscribe to a dynamic number of topics matching the pattern. | false | boolean |

## Example

<Callout type="note" title="NOTE">
To execute this flow, you need access to a running Kafka cluster. The `send-order` topic must be created in the cluster or Kafka must be configured to create topics automatically.
</Callout>

The following flow publishes messages to a Kafka topic through REST requests.

<Steps>
<Step>
The flow starts with a POST request to the `/send-order` endpoint with order data in the body.
</Step>
<Step>
Then, it logs the received message.
</Step>
<Step>
Next, it sends the message to the Kafka topic:
- Topic: `order` (topic where order messages are published)
- Broker: `localhost:9092` (Kafka server address and port)
- The request body content is published as a message to the topic.
</Step>
</Steps>

```yaml
- from:
    uri: "rest:post:/send-order"
    steps:
      - to:
          uri: "log:info"
      - to:
          uri: "kafka:orders"
          parameters:
            brokers: "localhost:9092"
```

![](https://creative-ball-51b3fc85c0.media.strapiapp.com/kafka_connector_7d12ad0881.png)
