Closed StuartFergusonVme closed 4 years ago
How will this be configured? Will the Subscription Service ctor accept configuration, and the hosting process rips it from appsettings.json or perhaps each Subscription that gets created as this as a field?
I seen this really as across the board but maybe on subscription with a default of true?
Yeah, that might be better. So perhaps the property is "Don't ignore system events" ?
If you have a look at EventAppeared in SubscriptionServce.cs, the following code is responsbile for filtering out system events:
if (resolvedEvent.Event == null)
{
subscription.Acknowledge(resolvedEvent);
return;
}
I wonder if we should even bother having this as a configuration option.
What would the use case be for allowing these events through?
There is also this bit as well:
if (ignoreSystemEvents && resolvedEvent.Event.EventType.StartsWith("$"))
{
subscription.Acknowledge(resolvedEvent);
return;
}
To be clear this job is now as follows:
Add in the following code (or similar) in EventAppeared:
if (resolvedEvent.Event.EventType.StartsWith("$"))
{
subscription.Acknowledge(resolvedEvent);
return;
}
This will not be configurable.
As well as that, if the resolvedEvent.Event is also null, we should also acknowledge the event.
Add in a configuration option that System Events (EventType starts with $).