Is there any easy way to list the stream names?
You can enable the $streams system projection.
This links the first event in every stream to a new stream called $streams.
I've workshopped with folk in the DDD-CQRS-ES channel (it'll have scrolled off the end if you're reading this more than a week after this)...
If turning on a projection is not possible in your context you're down to using ReadAllStreamEvents* to walk through. To make this less painful, two switches could be added to said call:
omitData - exclude Data and Metadata (would save a lot of bandwidth if you're not interested anyway)latestOnly - only include the highest id for each encountered stream (i.e., if you ask for 4096, items, each response would have 4096 unique streams in it)Another helpful feature given either of the above get implemented, would be for the 4096 response limit to be increased as it would then no longer be as likely to produce massive responses (and/or generate TCP packet size violation exceptions) as it presently does.
Note the logic still needs to traverse all the data either way - but it should generally dramatically reduce the number of roundtrips required (unless your access pattern is such that in a give span you're rarely repeatedly writing to the same stream) and bandwidth required (unless all your events are truly tiny)
Most helpful comment
You can enable the
$streamssystem projection.This links the first event in every stream to a new stream called
$streams.