Search code examples
apache-storm

Is it OK not to send ack to OutputCollector?


Suppose I have a bolt that needs to pass a list of some type. And if, after calculation, the list is empty, I don't emit. Does the bolt still need to ack?


Solution

  • Depends:

    If you are not using using RichBolt, than storm will call Ack for you after you exit the the execute method.

    If you are using RichBolt (what seem to be the case since sometimes you are acking)

    If you are using guarantee messaging you will need to ack the tuple, so the spout ack callback will be called. Also if you are not acking, you will get timeout, so the spout fail callback will be called