为什么在 Axon 框架的“TrackingEventProcessor”中会出现“ConversionException”?

问题描述

  • 使用 Axon 4.5
  • 使用 Spring Boot 2.5.2
  • 使用 Spring JPA

我写的 Saga 管理如下

@Saga
class OrderSagaManagement {
   @Autowired
   private lateinit var eventGateway: EventGateway

   @StartSaga
   @SagaEventHandler(associationProperty = "orderId")
   fun handle(orderCreatedEvent: OrderCreatedEvent) {
      val paymentId = Random().nextInt(10000)
      Sagalifecycle.associateWith("paymentId",paymentId)
      eventGateway.publish(PaymentEvent(paymentId,orderCreatedEvent.orderId))
   }
   ...
}

当我分派 OrderCreateEvent 时,ConversionException 出现在 TokenEventProcessor#processingLoop() 中,如下所示。

enter image description here

application.yml 如下。

spring:
  application:
    name: order-service
  datasource:
    url: MysqL
    username: MysqL
    password:
    driver-class-name: com.MysqL.jdbc.Driver
  jpa:
    hibernate:
      ddl-auto: update

axon:
  serializer:
    general: xstream
  axonserver:
    servers: localhost:8124

bulid.gradle

implementation("org.axonframework:axon-spring-boot-starter:4.5")

为什么Axon框架的'TrackingEventProcessor'会出现'ConversionException'?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)