Hi All
I’ve configured Snapshots by providing this configuration:
@Bean
public SpringAggregateSnapshotter snapshotter(ParameterResolverFactory parameterResolverFactory,
EventStore eventStore, TransactionManager transactionManager) {
Executor executor = Executors.newSingleThreadExecutor();
return new SpringAggregateSnapshotter(eventStore, parameterResolverFactory, executor, transactionManager);
}
@Bean
public Repository<Poll> pollRepository(Snapshotter snapshotter) {
EventSourcingRepository<Poll> repository = new EventSourcingRepository<Poll>(
pollAggregateFactory(),
eventStore,
new EventCountSnapshotTriggerDefinition(
snapshotter,
3)
);
return repository;
}
Now I constantly get this error
Command 'wepoll.command.AttachTopicsCommand' resulted in org.axonframework.eventsourcing.IncompatibleAggregateException(Aggregate identifier must be non-null after applying an event. Make sure the aggregate identifier is initialized at the latest when handling the creation event.)
Does it mean that I need to provide some special functional to restore aggregate state from snapshot? Why I get this error?
I'm new in Axon Framework...