ActiveMQ Delay and Schedule Message Delivery

ActiveMQ has a native support for deferred dispatch. It is supported by MassTransit, but we cannot guarantee anything more than the feature guarantees itself. Please read the message on the plugin project home page to get full understanding of the current status and limitations.

Scheduling messages

You can use the delayed exchange to scheduled messages instead of Quartz. To enable this, you need to configure your bus properly:

var busControl = Bus.Factory.CreateUsingActiveMq(cfg =>

    var host = cfg.Host(new Uri("activemq://localhost/"), h =>

Important: there is no support for unscheduling messages that are scheduled with the delayed exchange.


You also can use the delayed exchange to implement message redelivery (second-level retries). All you need to do is to call the context.Defer(TimeSpan delay) method in your consumer.

public async Task Consume(ConsumeContext<MyMessage> context)
        // process message
    catch (MyTemporaryException e)
        // we will try again later

results matching ""

    No results matching ""