The Kafka component is used for communication with Apache Kafka message broker.
URI Syntax: kafka:topic
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 |
NOTETo execute this flow, you need access to a running Kafka cluster. The
send-ordertopic must be created in the cluster or Kafka must be configured to create topics automatically.
The following flow publishes messages to a Kafka topic through REST requests.
The flow starts with a POST request to the /send-order endpoint with order data in the body.
Then, it logs the received message.
Next, it sends the message to the Kafka topic:
order (topic where order messages are published)localhost:9092 (Kafka server address and port)
We use cookies to enhance your experience on our site. By continuing to browse, you agree to our use of cookies.Learn more