My Storm Spout contains a Map<Object, Foo>
of message Id objects with their corresponding Foo objects I'm emitting. Every time the spout processes a message in nextTuple()
, the message Id with the Foo object is added to the map. When fail is called in the Spout, I use the message Id object to retrieve the Foo object from the map and replay the message (guaranteed message processing). On ack, I remove the message from the map.
This works for a single instance of the spout. I'm trying to verify if this will work if I parallelize the Spout, i.e. is a message always acked/failed by the spout that emitted it or can another instance of the spout pick up the ack/fail call?