# ActiveMQ

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

Quartz.NET Docker Image

MassTransit provides a Docker Image (opens new window) with ActiveMQ ready to run, including scheduler support.

# Configuration

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

namespace SchedulingActiveMQ;

using MassTransit;
using Microsoft.Extensions.DependencyInjection;

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

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

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

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

WARNING

Scheduled messages cannot be canceled when using the ActiveMQ message scheduler