Re: [axonframework] Axon SnapShotting with springboot

34 views
Skip to first unread message

Steven van Beelen

unread,
Sep 16, 2020, 8:45:16 AM9/16/20
to Axon Framework Users
Hi Rohit,

All you would have to provide is a SnapshotTriggerDefinition bean in your application context.
The regular implementation used is the EventCountSnapshotTriggerDefinition, which after N number of events triggers the creation of a snapshot.
A reasonable threshold for this is somewhere between 100 and 250 events by the way.

Next to providing the bean, you will have to set it up for your Aggregate.
Here, you can go two ways:
  1. Add the name of the SnapshotTriggerDefinition bean to the @Aggregate annotation's snapshotTriggerDefinition field.
  2. Provide an AggregateConfigurer bean in your application context which invokes the configureSnapshotTrigger method to set the snapshot trigger definition.
Trusting this will help you out Rohit!

Cheers,
Steven

PS. It is important to note that this mailing list will be discontinued as specified in this thread.
Instead of this mailing list we have moved to use a forum style of communication, at https://discuss.axoniq.io/.
Hope to see you there!

On Sun, Sep 6, 2020 at 7:34 PM Rohit Singh <kumarsing...@gmail.com> wrote:
Hello mates,

can anyone suggest any tutorial/sample project for Implementing Snapshot in AXON 4.4.2 with springBoot 2.3.3.

i went through the documentation(https://docs.axoniq.io/reference-guide/axon-framework/tuning/event-snapshots#snapshotting) but not able to implement. 

Thanks.

--
You received this message because you are subscribed to the Google Groups "Axon Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to axonframewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/axonframework/2765d2e4-69a9-47b7-9aad-4e81e7da92ean%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages