# ActiveMQ

MassTransit uses the built-in ActiveMQ scheduler to schedule messages.

Quartz.NET Docker Image

MassTransit provides a Docker Image with ActiveMQ ready to run, including scheduler support.

# Configuration

To configure the ActiveMQ message scheduler, see the example below.

namespace SchedulingActiveMQ
{
    using System;
    using MassTransit;
    using MassTransit.ActiveMqTransport;
    using Microsoft.Extensions.DependencyInjection;

    public class Program
    {
        public static void Main()
        {
            var services = new ServiceCollection();

            services.AddMassTransit(x =>
            {
                x.AddActiveMqMessageScheduler();

                x.UsingActiveMq((context, cfg) => 
                {
                    cfg.UseActiveMqMessageScheduler();

                    cfg.ConfigureEndpoints(context);
                });
            });
        }
    }
}

WARNING

Scheduled messages cannot be canceled when using the ActiveMQ message scheduler