Hi,
Would you have some working example for the DeadlineManager with Quartz and Spring Boot 2 ? It seems the documentation is not up to date yet.
What I managed to do so far is to configure the Deadline manager as following :
@Bean public DeadlineManager deadlineManager(Scheduler scheduler, AxonConfiguration configuration, SpringTransactionManager transactionManager, ObjectMapper objectMapper) { return new QuartzDeadlineManager(scheduler, new ConfigurationScopeAwareProvider(configuration), transactionManager, eventSerializer(objectMapper)); }
At that point, I’m able to inject it in a Saga for example. The scheduling part seems to work as well, but troubles come when the DeadlineManager tries to deserialize the GenericDeadlineMessage.
I tested with the default serializer and also with Jackson.
This is how I try to schedule and listen to the deadline message :
`
@Saga
public class TestDeadlineManagerSaga {
@Inject
private transient CommandGateway commandGateway;
@Inject
private transient DeadlineManager deadlineManager;
@StartSaga
@SagaEventHandler(associationProperty = “testId”)
public void on(TestEvent event) {
deadlineManager.schedule(Duration.ofSeconds(20), “test-deadline”);
}
@DeadlineHandler(deadlineName = “test-deadline”)
public void onDeadline() {
System.out.println(“deadline reached !”);
}
}
`
The stack trace I got after 20 seconds :
With Jackson : https://gist.github.com/faulomi/95dc06b12e0c4d738758f63610b80fe2
With XStream : https://gist.github.com/faulomi/191f9ed385db4f78f3e410f9bbd2842a
FYI, I’m using Axon 3.3.2 with Spring 2.0.3, and I included the spring boot Quartz starter.
This is my Quartz configuration, with Postgres :
`
spring.quartz.job-store-type=jdbc
spring.quartz.jdbc.initialize-schema=always
spring.quartz.properties.org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
`
Am I missing something obvious ?
Thank you for your help,
Jerome