1 - m1 is not sent to your bolts unless you manually include it in the
tuple. If you do, you can do whatever you want with it in the bolts. Storm
doesn't look at m1 at all, beyond receiving it from your spout
implementation, and passing it back to the spout on fail or ack. Instead,
Storm generates a random ID for the tuple corresponding to m1, and uses
that ID for tracking tuples based on the m1 tuple. You can read more about
how Storm tracks tuples at
https://storm.apache.org/releases/2.0.0-SNAPSHOT/Guaranteeing-message-processing.html,
and also by looking at the code in
https://github.com/apache/storm/blob/21bb1388414d373572779289edc785c7e5aa52aa/storm-client/src/jvm/org/apache/storm/executor/spout/SpoutOutputCollectorImpl.java#L109
2 - No, m1 is only stored locally in the executor running the spout. Unless
you put m1 in the tuple manually, it never leaves the spout's JVM.

Den man. 27. maj 2019 kl. 14.53 skrev Jayant Sharma <
sharmajayan...@gmail.com>:

> Hi all,
>
> I am emitting an anchored tuple from my spout, with a message Id, say m1,
> as my anchor.
> I have 2 questions:
> 1 - Can I change few fields in my m1 object in subsequent bolts and still
> expect storm to track tuples based on m1.
> 2 - When ack/fail is called on spout once bolts are done or have failed
> respectively, is this m1 passed back to spout from the bolts?
> My use case is such that I need to handle failure in spout differently for
> different bolts, so I am thinking if I can set few fields in m1 which spout
> can use at the time of fail to decide what it should do.
>
> Thanks,
> Jayant Sharma
>

Reply via email to