Can a Trident Topology work like a workflow with conditional paths (if-else)? e.g. A Spout (S1) connects to a bolt (B0) which based on certain values in the incoming tuple routes them to either bolt (B1) or bolt (B2) but not both.
A Trident “each” operator returns a Stream object, which you can store in a variable. You can then run multiple eaches on the same Stream to split it, e.g.:
Stream s = topology.each(…).groupBy(…).aggregate(…)
Stream branch1 = s.each(…, FilterA)
Stream branch2 = s.each(…, FilterB)
You can join streams with join, merge or multiReduce.