Kafka Storm integration

Now we will create a Storm topology that will consume messages from the Kafka topic new_topic and aggregate words into sentences.

The complete message flow is shown as follows:

We have already seen KafkaSampleProducer, which produces words into the Kafka broker. Now we will create a Storm topology that will read those words from Kafka to aggregate them into sentences. For this, we will have one KafkaSpout in the application that will read the messages from Kafka and two bolts, WordBolt that receive words from KafkaSpout and then aggregate them into sentences, which are then passed onto the SentenceBolt, which simply ...

Get Mastering Apache Storm now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.