MassTransit Quartz Scheduling - Will Repeated schedules be supported?

846 views
Skip to first unread message

paul.campbel...@gmail.com

unread,
Dec 17, 2013, 6:25:09 AM12/17/13
to masstrans...@googlegroups.com

I have been using MassTransit with Quartz integration and can successfully schedule messages to occur as a single-shot event at some point in the future.
I know that Quartz.Net supports repeated schedules and cannot see a MassTransit extension to hook into this. I think I have 4 options?:

  1. Write the extension myself (but loose NuGet updates)
  2. Hope that the MassTransit team support this at some point
  3. Adjust my consumer to re-schedule the repeated message on each consume (in effect, writing a workaround)
  4. Use Quartz.net to adjust the trigger that's been assigned to my scheduled job. I have been able to do this but it seems a bit of a "hack" - there's also threading delay considerations with this.

Any advice welcome!


Also posted to stack overflow: http://stackoverflow.com/questions/20631737/masstransit-quartz-scheduling-will-repeated-schedules-be-supported


Travis Smith

unread,
Dec 17, 2013, 8:10:22 AM12/17/13
to masstrans...@googlegroups.com
You could write the extension yourself and submit a pull request. I would start by opening an issue on the topic though, if we don't hear about it, it's not likely to be implemented unless we have a need. 

-Travis


--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/819d1998-d65c-4364-adac-fb771e9249e2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Chris Patterson

unread,
Dec 19, 2013, 11:58:09 AM12/19/13
to masstrans...@googlegroups.com

Chris Patterson

unread,
Dec 19, 2013, 12:00:09 PM12/19/13
to masstrans...@googlegroups.com
That being said, it's likely that the content of the message would need to change each time so that the fact they were unique messages could be done. Things like timestamps and event/command ids would need to roll with each message. So thoughts on how this might be handled are welcome.

Tim Gebhardt

unread,
Dec 19, 2013, 2:19:22 PM12/19/13
to masstrans...@googlegroups.com
I'm also very weary of doing repeated schedules for stuff, because I've run into situations where the messages kind of "eat their own tail".  If there's some sort of ordering to these messages, but one errors out and you can't fix it in time before the next run, will it really mess up your system?  Are you scheduling the messages so they fire rapidly, but at some point they can stack up -- and then do you need to process all of them?

It's more work, but when I have stuff like this I like to have a bit more control over it (at the risk of me messing up the reschedule but the payoff is not risking the aforementioned problems).  Inevitably too, some stakeholder will throw you some funny requirement like "Oh well we don't want this to happen on US Holidays".  If you have more control then that just ends up being some sort of exceptions table, whereas if you rely on the scheduling library I'm not sure how you <snark>encode Easter in a cron schedule</snark>.
Reply all
Reply to author
Forward
0 new messages