Akka.Streams: GroupBy
shouldn't require users to pre-calculate max number of groups
#7514
Labels
akka-streams
discussion
DX
Developer experience issues - papercuts, footguns, and other non-bug problems.
Version Information
Version of Akka.NET? v1.5.38
Which Akka.NET Modules? Akka.Streams
Describe the bug
So referencing my code sample from #7512 again, which you can run here: https://share.linqpad.net/bkgp72uf.linq
This will fail with a
TooManySubsStreamsException
- because my test data set has 50 uniqueEntityId
s but I've only specified a maximum of5
substreams. This seems like a really poor design choice to me - why should users have to pre-calculate how many groups their streams are going to be processed in advance?A much better approach would be for it to work the way my hack does:
Rather than blow up with a stupid exception, just shove the entities into the appropriate grouping as a partitioning strategy instead.
Additional context
If people really depend on / want to keep the current
GroupBy
behavior - fine, we can keep it even though I think it sucks. Maybe I'll call this.Partition
instead (and there's another equally bad stream stage with that name too.)The text was updated successfully, but these errors were encountered: