I think this is a big cost in complexity: you have to set summer parallelism twice: once for storm, once for this modulus to be correct. Also it is undocumented.

I'd like to find a cleaner way to do the batching. Can we query storm to get the parallelism of that level of bolts? Can we get the id of the bolt it would route the tuple to using Fields grouping and groupBy that? Can we avoid fields grouping and directly message the right node ourselves so there is no chance our assumptions change?

I am reluctant to go down this path.