charlessolar / Aggregates.NET

.NET event sourced domain driven design model via NServiceBus and GetEventStore

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DelayedAttribute add "once"

charlessolar opened this issue · comments

When delaying a message like:

[Delayed(typeof(Tick), delayMs: 10000)]

the messages are saved until 10 seconds go by and executed all at once.

Some message handlers don't need to receive all messages, just the very last one. So we can support a once: True parameter - and now that I think about it maybe it makes more sense to support first: True and last: True instead.