Apache Storm Component Guide
Also available as:
PDF
loading table of contents...

Streaming Data to Kafka

Storm provides a Kafka Bolt for both the core-storm and Trident APIs that publish data to Kafka topics. Use the following procedure to add a Storm component to your topology that writes data to a Kafka cluster:

  1. Instantiate a Kafka Bolt.

  2. Configure the Kafka Bolt with a Tuple-to-Message mapper.

  3. Configure the Kafka Bolt with a Kafka Topic Selector.

  4. Configure the Kafka Bolt with Kafka Producer properties.

The following code samples illustrate the construction of a simple Kafka bolt.