I've got a topology that starts with one single-field input tuple from a spout, then chains a bunch of bolts together.
* The spout emits a piece of event data, * The first bolt, in declareOutputFields(), declares that it will emit two fields - the input to the bolt plus one new field, * The next bolt does the same thing - takes two input fields and adds a third. Eventually I've got a bolt that declares it will emit 8 fields, though the first 7 are just pass-throughs from the previous bolt. Everything works fine, but since I'm declaring that I will emit 8 fields, I'm adding checks during processBolt() to validate the first 7 fields before doing the work and adding the 8th field that my bolt is meant to do. It doesn't feel like a good pattern. Is this chaining of one bolt to another the right way to go? Or should bolts only emit the new fields that they generate? (trying to attach an image to this question to illustrate the chaining)
