0
votes

I have a topology with single spout and 3 bolts(A,B,C).

Bolt A receives tuple from spout and emits new values by acknowledging it.

Bolt B and Bolt C consumes tuple from bolt A but no connection between bolt B and C. You can say two independent bolts.

If Bolt B fails and Bolt C succeeds to acknowledge tuple , will storm replay the same tuple again and again to Bolt C ?

I want to make sure both succeeds, if not tuple should go only to failed bolt and not for succeeded one. How I can achieve this.

I tried to see by mocking tuple fail in bolt B and success in C but storm replayed tuple to all bolts.

1

1 Answers

0
votes

If only B acks but C not, the original source tuple is replayed at the Spout. Thus, B will get the already acked tuples a second time. This, is called at-least-once processing, ie, you might get duplicates.

If you want to get exaclty-once you can use Storm's Trident API (so-called transactional topologies). See the Storm documentation for more details.