Handle an Event after a specific delay (say 10 minutes)

nservicebus

(Jerry Joseph) #1

I have a small endpoint which handles a Command and emits an Event. I need to handle this Event after a delay (say 10 minutes). What would be the best way to achieve this? Is it possible to achieve this with a single endpoint?


(Sean Feldman) #2

You could send a command to the endpoint itself (SendLocal) delaying it by 10 minutes. When that command is handled, it would raise the appropriate event w/o the need to delay the event. Events should indicate what happened, not what will happen.


(Jerry Joseph) #3

Ah I should use SendOptions DelayDeliveryWith(). Thanks.