title: Recurring message Masstransit rabbitmq
body: <p>I am trying to implement a heartbeat feature for my application hence was trying to implement recurring message feature from masstransit rabbitmq. I was trying to implement it on the sample given on masstransit's website. Here's all of the code.</p>
  
  <pre><code>namespace MasstransitBasicSample
  {
      using System;
      using System.Threading.Tasks;
      using MassTransit;
      using MassTransit.Scheduling;
  
      class Program
      {
          static void Main(string[] args)
          {
              var bus = Bus.Factory.CreateUsingRabbitMq(sbc =&gt;
              {
                  var host = sbc.Host(new Uri("rabbitmq://localhost"), h =&gt;
                  {
                      h.Username("guest");
                      h.Password("guest");
                  });
  
                  sbc.UseMessageScheduler(new Uri("rabbitmq://localhost/quartz"));
  
                  sbc.ReceiveEndpoint(host, "test_queue", ep =&gt;
                  {
                      ep.Handler&lt;YourMessage&gt;(context =&gt;
                      {
                          return Console.Out.WriteLineAsync($"Received: {context.Message.Text}");
                      });
                      ep.Handler&lt;PollExternalSystem&gt;(context =&gt;
                      {
                          return Console.Out.WriteLineAsync($"Received: {context.Message}");
                      });
                  });
              });
  
              bus.Start();
              SetRecurring(bus);
  
              Console.WriteLine("Press any key to exit");
              Console.ReadKey();
  
              bus.Stop();
          }
  
          private static async Task SetRecurring(IBusControl bus)
          {
              var schedulerEndpoint = await bus.GetSendEndpoint(new Uri("rabbitmq://localhost/quartz"));
  
              var scheduledRecurringMessage = await schedulerEndpoint.ScheduleRecurringSend(
                 new Uri("rabbitmq://localhost/test_queue"), new PollExternalSystemSchedule(), new PollExternalSystem());
          }
      }
  
      public class YourMessage { public string Text { get; set; } }
  
      public class PollExternalSystemSchedule : DefaultRecurringSchedule
      {
          public PollExternalSystemSchedule()
          {
              CronExpression = "* * * * *"; // this means every minute
          }
      }
  
      public class PollExternalSystem { }
  }
  </code></pre>
  
  <p>I have created a queue called quartz in my rabbitmq queue.</p>
  
  <p>When i run the application it sends a message to the quartz queue and that message just stays there , it does not go to the test queue.</p>
  
  <p>I was also expecting another message to be sent to the quartz queue after a minute based on the cron expression, that also does not happen.</p>
  
  <p>Is my setup wrong?</p>
  
  <p>Any help would be much appreciated.</p>