I'm using the code created from the offical NserviceBus Walk through, I'm trying to send a message from with the Schedule action
public class SendOrder : IWantToRunWhenBusStartsAndStops
{
public IBus Bus { get; set; }
public Schedule _schedule;
public SendOrder(Schedule schedule)
{
_schedule = schedule;
}
public void Start()
{
_schedule.Every(TimeSpan.FromSeconds(5),() =>
{
Bus.Send("Ordering.Server", new PlaceOrder {Id = Guid.NewGuid()});
Console.WriteLine("Sent a message.");
});
}
public void Stop()
{
}
}
But I get an error that I Don't understand why it would be calling out the Timeouts queue. When Invoking the Bus.Send that is not in the Schedule action it works fine.
The destination queue 'Ordering.Client.Timeouts@Z220-STATION1' could not be found. You may have misconfigured the destination for this kind of message (NServiceBus.Scheduling.Messages.ScheduledTask, NServiceBus.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=9fc386479f8a226c) in the MessageEndpointMappings of the UnicastBusConfig section in your configuration file. It may also be the case that the given queue just hasn't been created yet, or has been deleted.
Any help will be great!