-
-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Additional metadata #81
Comments
CorrelationId? CausationId? I think it's fine to keep it tight for "defaults", should be easy for consumers to add specific stuff like:
|
Correlation and causation id isn't easy as it would require commands to have an id. I am thinking about those too. Maybe the solution is to specify pre-defined header keys, and allow to pass a Acting user id - yeah, we normally make it a part of the business ( Have you seen the Command API feature? The main issue with it is a missing context with all the important stuff, including the user identity. Again, it would work better if there would be a way to populate some of the properties from Storing causation id would make little sense if commands aren't stored. You'd be having gaps in the sequence. It works fine with ESDB embedded projections and |
For CausationId i was only thinking about if the transition was caused by an event, having the commands as events would bridge this I agree. I've been down the path of storing commands in eventstore, and found it useful for diagnostics but the first thing you'd want to archive (or simply discard) - we ended up only doing it for certain types of aggregates, writing "CommandHandled" events to a stream per aggregate ($"CommandsHandled-{streamId}"), and having those with a max age of 3 months (scavenging the rest). I had not seen the Command API feature! Looks very neat :) At my previous gig we would have an overload for dispatching command, which would take a "context enrichment", which was monoidic. The 'command dispatcher' could be wrapped so one instance was aware of being used in a http context (enriching metadata with userId etc.), while another would be used by process managers, being aware of which policy was being used etc.. |
A problem might be: what happens to old events when this new metadata is required? Set DateTime.Min or null? If you have any plans on integrating the Creation Timestamp to the metadata, I'd love to contribute the Load-Functions for StateStore and AggregateStore with Timestamp as parameter. |
Creation date meta field could default to server-side creation date by default, it will be a special case. |
Thinking about what to add to the default meta.
created
system meta of ESDB gets lost when migrating to another store)The text was updated successfully, but these errors were encountered: