1. Home
  2. Documentation
  3. Integrations
  4. t Kafka

t Kafka

Available triggers

The Kafka component is used for communication with the Apache Kafka message broker.

URI Syntax: kafka:topic

Main Fields

Path parameters

Name
Description
Default
Type
topic (common)(required) Name of the topic to be used. On the consumer (trigger), you can use a comma 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 the Kafka documentation.β€”String
topicIsPattern (consumer)Defines if the topic is a pattern (regular expression). This can be used to subscribe to a dynamic number of topics matching the pattern.falseboolean

Example

The flow below receives messages, interprets the content, routes to different topics according to the status, and logs the result.

The flow starts listening to messages from the Kafka topic called topic-1, using the provided brokers, a clientId, and a groupId.

When a message arrives, it is converted from JSON to object using the Jackson library.

The flow checks the status field of the message. If status is URGENT, it sends the message to the topic topic-urgent. Otherwise, it sends it to the topic topic-common.

Finally, it logs the content of the processed message.

How happy are you with this page?

We use cookies to enhance your experience on our site. By continuing to browse, you agree to our use of cookies.Learn more