Hi,

>From what I understood – the way to define multiple streams on trident is
to define:

Stream stream = topology.newStream("spout", spout)

                              .each(*new* Fields("a"), *new* Task1(),
*new*Fields(
"b"));

            Stream branch1 = stream.each(*new* Fields("b"),
*new*SuccessFilter())

                                   .each(*new* Fields("b"), *new* Task2(),
*new* Fields("c"));

            Stream branch2 = stream.each(*new* Fields("b"), *new*FailFilter())

                                   .each(*new* Fields("b"), *new* GenTask(
"Task3"), *new* Fields("c"));





In the regular storm I would emit to different streams from the bolt.

The trident will become very complicated once I need to create multiple
branches.



For example, I am trying to simulate an event based flow which has a
different flow for success and fail.

To do that, on trident I created a SuccessFilter and FailFilter which
filter the data relevant.

In regular storm I would just emit to different streams: success-stream and
fail-stream which is much easier if I need multiple cases like this.



Is there a more simple way on trident I am missing to do that?



Any help on this will be great.

Thanks in advance,

Michal

Reply via email to