We are following CQRS architecture and using Jonathan Oliver's event-store version 3 for events. We want to create snapshot of the aggregate roots to improve performance.
I found an API (GetStreamsToSnapshot) which can be used for this. It gives all streams based upon how long before the snapshots have been created.
But I am not sure how to use the stream to create the snapshot as I do not know the aggregate type.
Please provide any inputs on how to create snapshots
As you have discovered, GetStreamsToSnapshot gives you a list of streams that are at least X revisions behind the head revision.
From there, it's a matter of loading up each stream. This is where you can append some kind of header information to the stream to determine what type of aggregate you're dealing.
Many times I'm asked why I don't just store the aggregate type information directly into the EventStore and make it a first-class part of the API. The answer is that it doesn't care about aggregates which is a DDD concept. All the EventStore cares about is streams and events.