Event Store spams SQL logging with updated to TokenEntry

Hi!
It’s not really a big deal since nobody really logs SQL in production, but it is still quite uncomfortable.
I noticed that as soon as I have JPA on the classpath, Axon wants there a couple of tables and updates “token entry” every second. I managed to put these tables in a separate schema but this updating kinda pollutes my SQL logging. Why is that needed?

Hi Sam,

The process in the Tracking Event Processor is such that a token which a given thread has claimed, wants to keep hold this claim to process any events occurring.
As the Tracking Event Processor is a polling mechanism, it will thus try to retrieve Events from a Streamable Message Source on it’s own accord.

The token in this respect is the means to be allowed to retrieve events, as it’s the coordinating mechanism for every thread/instance which is part of the given Processing Group for the Tracking Event Processor.

Once the end of the stream is reached, the claim is released, as the is no reason to hold a claim on the token in this scenario.
From here on, it kinda depends on your set up what occurs. A single threaded Tracking Event Processor and a single instance of the processor at hand, will give you the token reclaim scenario you’re noticing.
With multiple threads/nodes, the behavior will very likely differ, as I’d expect the claim to come in faster.

Regardless, this mechanism is in place for any user to provide quick handling of any new events which my be published to your Event Stream.
You can choose not to have this though, but the application will react ‘less snappy’ when it comes to calling the Event Handling Methods you’d write.

If the logging is bothering you, I am very sure you can drop that specific line through configuration if necessary.

Cheers,
Steven

Thank you for taking the time to write this, very insightful!