DeadlineManager use cases

Hello there,

We rely on Axon framework to implement our event driven warehouse management system and we are currently in the process to migrate to the AxonDb event store.
We have several sagas in one of our services that listen to events coming from the warehouse and notify an instance of SAP of changes to a given order.

Those sagas should sometimes hold back the call to SAP until a confirmation (from SAP) has arrived for a previous event belonging to the same order.
We have implemented this approach by scheduling ad-hoc polling events (through the EventScheduler) whose jobs is to trigger that specific saga to check
if the preconditions for the current pending events are met.

We see now that from axon 3.3, if I am not mistaken, a DeadlineManager has been introduced.
Unfortunately there isn’t a comprehensive documentation available yet but it looks to me that a DeadlineManager allows you to schedule a DeadlineMessage to be triggered at some point in time.

The main difference with the event scheduler approach seems that a DeadlineMessage is not an event and therefore it won’t be part of the event stream.
Am I correct in this assumption?

Furthermore what is the preferred way, according to you, to implement our use case?
Is it better to have a history of events that clearly show how many times you have been trying to execute a given operation or use a DeadlineMessage?

What was the reasoning behind the introduction of the DeadlineManager? What use cases had you in mind?



Hi Mario,

You are right, we still don’t have the documentation of DeadlineManager merged. However, we have a pull request which is still under construction ( In short, a DeadlineManager will schedule a DeadlineMessage to be executed on Saga (or Aggregate) where it was scheduled from. DeadlineMessage itself is an EventMessage, however, it is not sent via EventBus. Thus, DeadlineMessage is not stored in the EventStore.

When it comes to your case, I guess it depends on your needs. Does storing those attempts make a business value to your application? If the answer is yes, I’d suggest using EventScheduler, otherwise DeadlineManager.

Hope this helps!