开发者

How to NServiceBus Publish() in Fixed interval

开发者 https://www.devze.com 2023-02-17 18:01 出处:网络
Is it possble to configure the Publisher to run in fixed interval, say every hour?In the example I downloaded from the NServiceBus web site, the publisher publishes whenever a user hit enter key.So, i

Is it possble to configure the Publisher to run in fixed interval, say every hour? In the example I downloaded from the NServiceBus web site, the publisher publishes whenever a user hit enter key. So, instead of that, I 开发者_如何学编程would like to publish a message every hour.

Thanks.


You can set up a timer from an IWantToRunAtStartup class's Run method. Then publish to the bus every time the timer fires.

0

精彩评论

暂无评论...
验证码 换一张
取 消