multiple emits in nextTuple

Showing 1-2 of 2 messages
multiple emits in nextTuple Colin Surprenant 10/28/11 10:29 AM

Is it generally a good idea to bundle multiple emits in a single nextTuple call? For example, if a spout is reading from a queue and we know there are N items sitting in the queue, is it a good idea to emit N items directly in a single nextTuple call of it's better to cycle through multiple nextTuple calls? 

I'd guess emitting multiple tuples when possible would be an optimization, but keeping in mind that nextTuple should not block, we could use an upper bound on the emit bundle size that each nextTuple can do...

Does that make sense?

Re: multiple emits in nextTuple nathanmarz 10/29/11 4:56 PM
It's better that nextTuple emit a maximum of one tuple. This lets
Storm enforce the TOPOLOGY_MAX_SPOUT_PENDING config.

If you have more tuples on hand, you can buffer those internally to
the spout.


On Oct 28, 10:29 am, Colin Surprenant <>