Kafka Channel
To send and receive messages from a Kafka broker, use the TIBCO BusinessEvents Kafka channel. The Kafka channel converts the incoming Kafka messages to the BusinessEvents events and outputs BusinessEvents events as outgoing Kafka messages.
Catalog Functions
You can send and receive events with payload in Kafka channel using Event.sendEvent(), and Event.routeTo(). Currently, Kafka does not support synchronous request-reply of messages; thus, the functions Event.requestEvent() and Event.replyEvent() are not supported.
Kafka Properties
In BusinessEvents, you can specify Kafka properties for broker configurations as BusinessEvents properties. Add the prefix be.channel.kafka to Kafka properties to let Businessevents identify them as Kafka channel properties. For example, for specifying the default.replication.factor Kafka property, use be.channel.kafka.default.replication.factor. You can also override an existing Kafka property, which has been exposed through the BusinessEvents Studio channel editor, by using the same prefix.
Kafka Channel Serializers
- KafkaMapSerializer
- The KafkaMapSerializer serializer (com.tibco.cep.driver.kafka.serializer.KafkaMapSerializer) encodes the event properties and the payload as a Java serialized HashMap as bytes. The KafkaMapSerializer is used to send and receive events between BusinessEvents instances. For incoming messages the serializer converts the bytes sequence to event and its payload.
- KafkaStringPayloadSerializer
- The KafkaStringPayloadSerializer serializer (com.tibco.cep.driver.kafka.serializer.KafkaStringPayloadSerializer) serializes and deserializes the event payload, ignoring the event properties. For incoming messages, the KafkaStringPayloadSerializer decodes the text from the message as an XML string and sets it to the event's payload. For outgoing events, the serializer converts XML payloads to an XML string. The KafkaStringPayloadSerializer serializer is useful for consuming XML strings from external systems, such as, TIBCO BusinessWorks.
- Kafka Terminology
Apache Kafka™ is a distributed streaming platform. Kafka runs as a cluster in one or more servers. The Kafka cluster stores streams of records in categories called topics. Each record has a key, value, and a timestamp. - Adding a Kafka Channel in BusinessEvents Application
Configure channel properties and destination properties for Kafka channel to successfully add the Kafka channel to the BusinessEvents application.