orcun
orcun

Reputation: 14979

Replaying events on a service bus without event store

I am trying to design a new service and trying to follow CQRS. I am using ORM (NHibernate) for read and write models. In addition to that, write models are not event sourced. My goal was to keep technologies familiar at first and later on move to NoSQL at the read side and event sourcing at the write side.

I was hoping that using a service bus, I would be able generate new read models just by replaying old events; however I am now stuck. I have a few questions:

  1. Does what i am trying to accomplish make any sense? If so, can I do this using "Service Bus for Windows Server"? I could not find a way to just create a new subscription and let the cursor start from the beginning for a topic. Are events purged when all existing subscribers consume them?

  2. If it makes sense but "Service Bus for Windows Server" is not up to the job, do you recommend looking for an alternative service bus or implementing event sourcing on the write side?

Upvotes: 3

Views: 878

Answers (1)

Dennis Traub
Dennis Traub

Reputation: 51634

You don't necessarily need a service bus or event sourcing to replay events. You can simply serialize your events to disk (or any other means of storage) and reload them as needed.

Have a look at the simple example implementation of Beingtheworst. The samples can be found at GitHub. Especially E002 and E003 use serialized events without a service bus or the explicit notion of event sourcing.

Upvotes: 1

Related Questions