Writing (auditing) commands to geteventstore

I’m using EventStore in the typical fashion as an… event store. I have aggregates, which are stored as event streams, and all my events have CorrelationId (as well as a CausationId), which initially always comes from a command that came into the system somewhere. I was thinking, since all the events are written to eventstore, it would be good to write all commands as well, and use the projections feature to build a pretty effective auditing log that shows the commands that led to a chain of events.

Question is, what might be the most appropriate way to organise the streams for commands? I wondered about a few options:

  1. Single stream with all commands written to it.
  2. Stream-per-aggregate (which obviously parallels the event storage, and means streams don’t get massive).
  3. Stream-per-user.
  4. Stream-per-period (monthly? annually?).
    Does anyone have any advice?

Cheers,

Neil.

Hi,

The Stream-Per-Aggregate contains the result of some processing logic done by a processing component, right?

In that case I usually use PersistenSubscriptions for that kind of processing components. Each subscriber subscribes an “input-servicename” stream where I send all the input commands coming from my apps or api’s.

If I’m not interested to keep them (but that’s unusual) I can set a max age on that input stream.

Hope this helps

Cheers

Riccardo