Hello,
I have been trying to use the Tracking Processors but I am not sure that I understanding correctly what is happening in my application.
In essence, I see a thread constantly connecting to the database to refresh the timestamp of the only token (I have one processor) present in the table which causes the application to never stop (it’s a Spring boot app without web server).
I was expecting the tracking processor to start when an event is publish or the application is started and stop itself if there is nothing to do but that’s not what seems to be happening.
Also I don’t understand why it writes constantly (I do understand it needs to check for changes in the token index when it runs).
Can you please help me understand what’s happening?
I don’t know if it’s useful but the use of tracking processors is enabled globally with:
`
@Autowired
public void configure(EventHandlingConfiguration config) {
config.usingTrackingProcessors();
}
`
I also have a single event handle that I see getting called once when the event is dispatched the first time (when the aggregate is created):
`
@Component
public class TestEventHandler {
@EventHandler
private void handle(TestCreatedEvent event) {
System.out.println(“Event handled!”);
}
}
`
I have tried with both event sourced and regular aggregates with the same result.
Thanks in advance for your help