1) No. Storm doesn't know whether a tuple failed due to fail() being called, or due to the timeout. If you want to try and build some mechanism to distinguish the cases, you should look at the Acker bolt https://github.com/apache/storm/blob/09e01231cc427004bab475c9c70f21fa79cfedef/storm-client/src/jvm/org/apache/storm/daemon/Acker.java#L70 and the executor running the spout https://github.com/apache/storm/blob/09e01231cc427004bab475c9c70f21fa79cfedef/storm-client/src/jvm/org/apache/storm/executor/spout/SpoutExecutor.java#L328.
2) No. When the spout emits a tuple, it usually emits it with a message id structure (e.g. the Kafka offset and partition for the Kafka spout). The message id is what is passed to the fail method, not the tuple itself. 2018-04-20 9:30 GMT+02:00 Java Progarammer <[email protected]>: > Hi, > > I have few doubts regarding how retries work in storm > > 1) In spouts fail method I want to distinguish between the tuples that are > failed because they timed out or they failed because one of the bolt called > fail() on them. Does storm have some inbuilt mechanism for this ? > > 2) When calling faill(inputTuple) in bolt if I change some thing in > inputTuple before calling fail method on it will I able to access the > modified inputTuple in spouts fail method ? > > Thanks in advance. > > Thanks, > Sharique. > >
