Durable Messaging and Command Processing
One of Jasper's most important features is durable message persistence using your application's database for reliable "store and forward" queueing with all possible Jasper transport options, including the lightweight TCP Transport and external transports like RabbitMQ Transport or and Azure Service Bus Transport.
It's a chaotic world out when high volume systems need to interact with other systems. Your system may fail, other systems may be down, there's network hiccups, occasional failures -- and you still need your systems to get to a consistent state without messages just getting lost en route.
To that end, Jasper relies on message persistence within your application database as it's implementation of the Transactional Outbox pattern. Using the "outbox" pattern is a way to avoid the need for problematic and slow distributed transactions while still maintaining eventual consistency between database changes and the outgoing messages that are part of the logical transaction. Jasper implementation of the outbox pattern also includes a separate message relay process that will send the persisted outgoing messages in background processes (it's done by marshalling the outgoing message envelopes through TPL Dataflow queues if you're curious.)
If a Jasper system that uses durable messaging goes down before all the messages are processed, the persisted messages will be loaded from storage and processed when the system is restarted. Jasper does not include any kind of persistence in the core Jasper library, so you'll have to use an extension library to add that behavior.
Today the options are:
Note! You will need to be using some kind of database-backed message persistence in order to make the Scheduled Message Delivery and Execution or scheduled local execution function durably.
Note that the Using Marten with Jasper support relies on the Postgresql backed persistence, and the Using Entity Framework Core with Jasper support will need to be used in conjunction with either the Sql Server or Postgresql backed message persistence.
The message durability also applies to the local worker queues.
Also see the following topics to learn more about using, managing, and configuring the durable message persistence: