【发布时间】:2018-12-03 16:00:27
【问题描述】:
显然 Axon 默认使用TrackingEventProcessors。我想改用SubscribingEventProcessors。 docs 说 the latter is already the default,但它们似乎已经过时了。
默认情况下,Axon 将使用订阅事件处理器。有可能的 更改处理程序的分配方式和处理器的配置方式 使用 Configuration API 的 EventHandlingConfiguration 类。
例如,建议进行如下配置:
@Autowired
public void configure(EventHandlingConfiguration config) {
config.usingTrackingProcessors(); // default all processors to tracking mode.
}
但是,v4 中没有 EventHandlingConfiguration(在 v3 中有)。
我需要使用SubscribingEventProcessors 在与命令处理相同的事务中执行读取模型更新。这在 4.0 中如何配置?
【问题讨论】:
标签: event-handling axon