I have a topology for processing documents with two bolts. I need to be able to make modifications a data structure stored in the spout after a document is fully processed/has made its way through the whole topology. Before learning more about Apache Storm, I believe that the 'ack' method that is implemented in the spout was only called at the end of the topology. I see now that 'ack' needs to be called in every bolt and am confused.
Essentially, if I put custom code in the 'ack' method in the spout: when would it be executed? Everytime the 'ack' method is called in a bolt or when the entirety of a tuple tree has been acked/once per tuple emitted per spout?