Reputation: 3884
I'm beginner in Storm and I would like to know whether I should use BaseRichBolt
or BaseBasicBolt
if at-most-once processing is good for me?
As I understand in case of BaseBasicBolt
tuples are automatically anchored and acknowledged and in case of BaseRichBolt
we have to do that ourselves. Does that mean that I should use BaseRichBolt
if I want at-most-once processing?
My logic is that anchoring and acking will unnecessary make things slower, am I right?
Upvotes: 5
Views: 2256
Reputation: 645
If you are not worrying about data lost you can use BaseRichBolt but if you want to guaranteed message processing, that time you need to use BaseBasicBolt.In storm three type message processing at least once, exactly once and at-most-once. Useful link: https://bryantsai.com/fault-tolerant-message-processing-in-storm/
Upvotes: 2
Reputation: 62350
In order to enable fault-tolerance in Storm, it is required that Spouts assign message IDs to the tuples they emit. As long as there are no message IDs assigned, acking and anchoring will have no effect.
Thus, the overhead that BaseBasicBolt
has is tiny and you should not be able to measure any performance difference. Of course, using BaseRichBolt
will avoid this tiny overhead at all.
Upvotes: 2