Apache assault bolt gets multiple input tuples from different holes / bolts

Is it possible for a bolt to get several input tuples from different spouts / bolts? For example, Bolt C receives input tuples from Spout A and injects tuples from Bolt B for processing. How to implement it? I mean writing Java code for Bolt C, as well as its topology.

+4
source share
2 answers

The study guide answers your question.

https://storm.apache.org/documentation/Tutorial.html

Here is the code for your purpose (C / P from the tutorial):

builder.setBolt("exclaim2", new ExclamationBolt(), 5)
            .shuffleGrouping("words")
            .shuffleGrouping("exclaim1");

exclaim2will accept tuples both from wordsand exclaim1using random grouping.

+5
source

. , , DAG. . 1. Spout C 2. Spout B 3. B C

+2

All Articles