The Apache Kafka event receiver reads the tail of a given file and inputs that Kafka event receiver subscribes to a user-defined topic on a user-configured Kafka broker. Then the messages published to that topic are received by the Kafka receiver and forwarded to the WSO2 product engine. This This feature is donated by by Andres Gomez Ferrer.For For more information, go to see Apache Kafka documentation.
Table of Contents | ||
---|---|---|
|
...
- Download Apache Kafka server.
Copy the following client JAR files from
<KAFKA_HOME>/lib/
directory to<PRODUCT_HOME>/repository/components/lib/
directory.kafka_2.10-0.8.1.jar
zkclient-0.3.jar
scala-library-2.10.1.jar
zookeeper-3.3.4.jar
kafka-clients-0.8.2.1
metrics-core-2.2.0
Info The above jars are the client jars for Kafka 2.10-0.8.1. If you want to use the client jars for If you are using Kafka_2.1011-0.9.0.1 or Kafka_2.11-0.9.0.1, the following needs to be done.
Copy the following client JAR files from<KAFKA_HOME>/lib/
directory to10.0.0, you need to download this jar and save it in the
.<PRODUCT_HOME>/repository/components/lib/
directorykafka_2.11-0.9.0.1.jar
kafka-clients-0.9.0.1.jar
metrics-core-2.2.0.jar
scala-library-2.11.7.jar
scala-parser-combinators_2.11-1.0.4.jar
zkclient-0.7.jar
zookeeper-3.4.6.jar
<DAS_HOME>/repository/conf/security
directory.
- Start the Apache Kafka server.
...
The above adapter properties are described below.
Adapter Property | Description | Configuration file property | Example |
---|---|---|---|
Server Zookeeper IP | IP address of the Zookeeper Server | zookeeper.connect | 127.0.0.1 |
Group ID Kafka | Kafka consumer group id which uniquely identifies a set of consumers within the same consumer group | group.id | groupid |
Threads | Number of consumer threads | threads | 4 |
Optional Configuration Properties | Valid property and value pairs to denote o ptional configuration properties for Apache Kafka. (E.g. "property1: value1, property2: value2") For more information on Axis2 JMS properties, go to Apache Kafka Documentation. | optional.configuration | zk.sessiontimeout.ms:6000 |
Topic Kafka | Name of the Kafka topic to which, input messages are published | topic | test_topic |
Is events duplicated in cluster | In a cluster whether the same event can reach two receiver nodes | events.duplicated.in.cluster | true/false |
Related samples
For more information on kafka
event receiver type, see the following sample in WSO2 CEP Documentation.
...