I'm using NServiceBus in a pub/sub application for event notifications on a web application. Right now, when something happens (like a note is created), a message is created and sent on the bus, and the subscriber picks it up and determines who needs to get an email or SMS notification of the event.
What I want to do is put a delay in the processing stream for some of the events. The purpose of this delay is similar to the old 7-second delay on live TV -- it gives the user that fired the event time to undo what they did.
Consider our event of CommentCreated
. This event is sent when a new comment is persisted by my service layer. This comment can be marked as private or internal, and it's not uncommon for a user to create a comment then realize they should have marked it private.
I'd like to accomplish this delay without Sagas because, for one, I'm not savvy on them, for two, they seem to be a bit of an overkill for this simple of a requirement, and for three I don't want to have to deal with another database server to persist their data. The ghetto option would be to set a timer in my subscriber's handler and wait a few minutes before processing, but that just feels wrong.
Is it possible to do this within NServiceBus? I know some people will say to create a polling service, but that sort of defeats the purpose of a service bus...