You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by David Novogrodsky <da...@gmail.com> on 2014/04/25 20:44:27 UTC

sending the same stream to two different bolts, possible?

All,

This may be a simple question.  If I have a spout and two
bolts, printerBolt and secondPrinterBolt;if I do something like this:

        builder.setBolt("secondPrinterBolt", new SecondPrinterBolt())
                .fieldsGrouping("criticalSeverityFilter", new
Fields("severity"));
        builder.setBolt("printerBolt", new PrinterBolt())
                .fieldsGrouping("criticalSeverityFilter", new
Fields("severity"));
will both printer bolts be processing the same stream?  I mean if a tuple
is sent to one printer bolt is it also send to the other printer bolt?

David Novogrodsky
david.novogrodsky@gmail.com
http://www.linkedin.com/in/davidnovogrodsky

Re: sending the same stream to two different bolts, possible?

Posted by Michael Rose <mi...@fullcontact.com>.
That's correct, the stream will be duplicated in the above case.

Michael Rose (@Xorlev <https://twitter.com/xorlev>)
Senior Platform Engineer, FullContact <http://www.fullcontact.com/>
michael@fullcontact.com


On Fri, Apr 25, 2014 at 12:44 PM, David Novogrodsky <
david.novogrodsky@gmail.com> wrote:

> All,
>
> This may be a simple question.  If I have a spout and two
> bolts, printerBolt and secondPrinterBolt;if I do something like this:
>
>         builder.setBolt("secondPrinterBolt", new SecondPrinterBolt())
>                 .fieldsGrouping("criticalSeverityFilter", new
> Fields("severity"));
>         builder.setBolt("printerBolt", new PrinterBolt())
>                 .fieldsGrouping("criticalSeverityFilter", new
> Fields("severity"));
> will both printer bolts be processing the same stream?  I mean if a tuple
> is sent to one printer bolt is it also send to the other printer bolt?
>
> David Novogrodsky
> david.novogrodsky@gmail.com
> http://www.linkedin.com/in/davidnovogrodsky
>