NEventStore / NEventStore.Persistence.RavenDB

RavenDB Persistence Engine for NEventStore
MIT License
2 stars 10 forks source link

CheckpointNumberIncrementListener doesn't get applied if you aren't using the factory #15

Closed kblooie closed 9 years ago

kblooie commented 9 years ago

CheckpointNumberIncrementListener is used to set the next checkpointId. This is listener is required by the RavenPersistenceEngine. However, it doesn't get added to the documentStore if the user instantiates the RavenPersistenceEngine directly, providing their own IDocumentStore.

We should move adding the listener as initinalization logic to inside RavenPersistenceEngine. However, RavenPersistenceEngine depends on IDocumentStore, which doesn't expose RegisterListener. We should consider changing the dependency to DocumentStoreBase.

This will be a breaking change to the RavenPersistenceEngine ctor contract.