Deadlines in Axon Framework

Introduction

Sometimes, you don’t want to trigger an aggregate or saga directly, but only after some time has passed. When this is the case, you can use a Deadline. Note that if the event you want to publish is a non-domain event, a scheduled event might be a better fit. To use deadlines, you need a DeadlineManager.

This tutorial guides you through the basics of starting to work with deadlines. This includes configuring a deadline manager, scheduling, and handling of a deadline, and writing a test for it. Finally, changing it to a more advanced use case by expanding the functionality. As an example it uses an expiring gift card after a certain amount of time has passed.