为什么使用axon framework的saga时'token_entry'不断更新?

Why is 'token_entry' constantly updated when using saga of axon framework?

我用 spring boot & jpa(mysql) & axon framework 组成了项目。

(我只使用了 Axon 自动配置。)

并且,我写下了轴突框架的传奇故事。

@Saga
class OrderSagaManagement() {
   ...
}

当我运行申请spring时,下面的查询不断运行.

update
   token_entry 
set
   timestamp=? 
where
   processor_name=? 
   and segment=? 
   and owner=?

我简单注册了saga管理和运行spring应用,为什么token_entry更新查询继续运行?

来自docs

...a streaming processor should claim a token before it is allowed to perform any processing work...

基本上,Axon Framework 通过使用令牌来跟踪您的应用程序使用的事件。每个应用程序都必须申请一个令牌才能处理一个事件,以确保它不会在并行情况下被双重处理,例如。

因此,每隔几秒钟(您可以检查上面提供的 link 中的 3 个选项),您的一个应用程序实例会尝试窃取令牌或扩展声明。这就是为什么您经常在 table 上获得更新。