Hi,everyone! I'm the newer of MassTransit.I want use the MassTransit.QuartzService to schedulemessage. I have compling the source code of MassTransit.QuartzService and run it in the console.
this is the config file of MassTransit.QuartzService
<appSettings>
<add key="Scheme" value="msmq" />
<add key="MSMQHost" value="localhost" />
<add key="RabbitMQHost" value="localhost" />
<add key="RabbitMQVirtualHost" value="" />
<add key="RabbitMQUsername" value="guest" />
<add key="RabbitMQPassword" value="guest" />
<add key="RabbitMQOptions" value="" />
<add key="ControlQueueName" value="masstransit_quartz_scheduler" />
<add key="ConsumerLimit" value="1" />
</appSettings>
this is my sample,but it doesn't work
Bus.Initialize(cfg =>
{
cfg.UseMsmq();
cfg.UseMulticastSubscriptionClient();
cfg.UseJsonSerializer();
cfg.ReceiveFrom("msmq://localhost/masstransit_quartz_scheduler");
cfg.BeforeConsumingMessage(() => Console.WriteLine(DateTime.Now));
cfg.Subscribe(subs =>
{
subs.Handler<ScheduledMessage>(msg => Console.WriteLine("Message received!"));
});
});
Bus.Instance.ScheduleMessage<ScheduledMessage>(DateTime.Now.AddSeconds(5), new ScheduledMessage() { Values = "msg"});
Console.ReadKey();
I'm in lost,I can't found any sample of MassTransit.QuartzService about how to use it.