In the example.
The code creates a TuplesBuilder and a KafkaSpoutStreams
Essentially the code is trying to take TOPICS, TOPICS, and TOPICS translate them to Fields("topic", "partition", "offset", "key", "value") and output them on STREAMS. Then just for TOPICS they want it to be output as Fields("topic", "partition", "offset") to STREAMS. (Don't know what happened to STREAMS)
There are two issues here. First with how the TupleBuilder and the SpoutStreams are split up, but coupled STREAMS is actually getting the full "topic" "partition" "offset" "key" "value", but this minor. The real issue is that the code uses the same KafkaSpoutMessageId for all the tuples emitted to both STREAMS and STREAMS.
The code, however, is written to assume that it will only ever get one ack/fail for a given KafkaSpoutMessageId. This means that if one of the emitted tuple trees succeed and then the other fails, the failure will not result in anything being replayed! This violates how storm is intended to work.
I discovered this as a part of
STORM-2225, and I am fine with fixing it on STORM-2225 (I would just remove support for that functionality because there are other ways of doing this correctly). But that would not maintain backwards compatibility and I am not sure it would be appropriate for 1.x releases. I really would like to have feedback from others on this.
I can put something into 1.x where it will throw an exception if acking is enabled and this situation is present, but I don't want to spend the time tying to do reference counting on the number of tuples actually emitted. If someone else wants to do that I would be happy to turn this JIRA over to them.