Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Apache Kafka input adapter reads the tail of a given file and inputs that to the WSO2 product engine. This feature is donated by Andres Gomez Ferrer. For more information, go to Apache Kafka documentation.

Table of Contents
maxLevel3

Excerpt
hiddentrue

NOTE TO WRITERS: Add the TOC here.

Table of Contents
maxLevel3

Prerequisites

Set up the below prerequisites to start configuring an input Apache Kafka event adapter.

  1. Download Apache Kafka server

  2. Copy the following client JAR files from <KAFKA_HOME>/lib/ directory  to <CEP_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
  3. Copy all the JAR files, which are located in <KAFKA_HOME>/lib/ directory to <CEP_HOME>/samples/lib/ directory.

Configuring input Kafka event adapter

You can configure input Kafka event adapter using the management console or using a configuration file.

Anchor
Using the management console
Using the management console
Configure using the management console

Follow the instructions below to configure input Kafka event adapter using the management console. This deploys the event adapter in the <PRODUCT_HOME>/

...

  1. Log in to product's management console, and click Configure.
  2. Click Input Event Adaptors in the Event Processor Configs menu, and then click Add Input Event Adaptor.
  3. Enter details as shown in the below example. 
    create input Kafka event adapter

  4.  Click Add Event Adaptor.

Anchor
Using a configuration file
Using a configuration file
Configure using a configuration file

Follow the instructions below to configure input Kafka event adapter using a configuration file.

...

Info

After an adapter is successfully added, it gets added to the list of adapters displayed under Event Processor Configs in the Configure menu of the product's management console. Click Edit to change its configuration and redeploy it. This opens an XML-based editor allowing you to edit the event adapter configurations from the UI.  Do your modifications and click Update. You can also delete it, enable/disable statistics or enable/disable tracing on it using the provided options in the UI.

Configuring input Kafka event adapter message properties

The configured input event adapters are used in Event Builders. With input event adapter message properties, event builders are able to extract data from the incoming events to build the event streams. Following are the specific message properties of input Kafka event adapter.

input Kafka event adapter message propertiesImage Removed

The message properties of the input Kafka . Message properties specific to input event adapters of the kafka type can be configured as follows.

  1. Log into the CEP Management Console. For detailed instructions, see Running the Product.
  2. Click the Configure tab and then click Event Builders to open the Available Event Builders page.
  3. Click the name of the event builder to which the relevant input event adapter is connected. This opens the Event Builder Details page.

    input Kafka event adapter message propertiesImage AddedThe message properties of a kafka input event adapter are described below.

    PropertyDescription
    Topic KafkaName of the Kafka topic to which, input messages are published
    Input Mapping TypeThe incoming event type to be mapped