我正在尝试通过rabbitmq 将消息发送到基于 axon4 spring boot 的系统。已收到消息但未触发任何事件。我非常确定我错过了一个重要的部分,但到目前为止我还无法弄清楚。
这是我的 application.yml 的相关部分
axon:
amqp:
exchange: axon.fanout
transaction-mode: publisher_ack
# adding the following lines changed nothing
eventhandling:
processors:
amqpEvents:
source: in.queue
mode: subscribing
spring:
rabbitmq:
username: rabbit
password: rabbit
Run Code Online (Sandbox Code Playgroud)
从文档中我发现我应该创建一个 SpringAMQPMessageSource bean:
axon:
amqp:
exchange: axon.fanout
transaction-mode: publisher_ack
# adding the following lines changed nothing
eventhandling:
processors:
amqpEvents:
source: in.queue
mode: subscribing
spring:
rabbitmq:
username: rabbit
password: rabbit
Run Code Online (Sandbox Code Playgroud)
如果我从rabbitmq管理面板向队列发送消息,我会看到日志:
AxonConfig : received external message: (Body:'[B@13f7aeef(byte[167])' MessageProperties [headers={}, contentLength=0, receivedDeliveryMode=NON_PERSISTENT, redelivered=false, receivedExchange=, receivedRoutingKey=in.queue, deliveryTag=2, consumerTag=amq.ctag-xi34jwHHA__xjENSteX5Dw, …
有人尝试让 hibernate-ehcache 与最新的 Spring Boot 3 和 hibernate 6 一起使用吗?取自库的最新更新(6.0.0-alpha7,最后更新于 2021 年),这似乎不会继续?有没有新的东西可以替代我迄今为止错过的东西?