Aggregate commandhandler not discoverable with Distributed Command

Please help me to solve the problem :slightly_frowning_face:

Basic information

  • Axon Framework version:4.4.3
  • JDK version:1.8
  • extension-springcloud :4.3.1

Goal
I want use spring cloud implement command distributed invoke.

A total of 26 @CommandHandler annotation method:
OrderAggregateCommandHandler.java has 16 @CommandHandler annotation method.
OrderAggregate.java has 10 @CommandHandler annotation method.(this is Aggregate)。

Steps to reproduce:

  • First start-up Machine M1, can find Aggregate CommandHandler

  • In a minute, after the listening begins,Aggregate commandhandler not Discoverable

  • error : WARN: Command

OrderCreateCommand in OrderAggregate.java ,so have an error:

‘com.ly.train.common.domain.command.action.sale.order.OrderCreateCommand’ resulted in org.axonframework.commandhandling.NoHandlerForCommandException(No node known to accept [com.ly.train.common.domain.command.action.sale.order.OrderCreateCommand]) [FailureLoggingCallback.java:64]

why not find Aggregate Command handlers not Discoverable with Distributed Command?

This problem has been bothering me for a long time. I would appreciate it if you could help me.

Many thanks.

Hi @Vinson,

I believe this is a version issue in the end.
We had a similar problem on our repo recently that you can find here but specially this comment here.

To fix your problem I would first validate the versions of your spring-cloud according to the comment above and check which one works for you. Another way to go is to build the extension-springcloud project yourself (based on master) and use that because it already is using Hoxton.SR9 but not released yet.

@lfgcampos his recommendation would likely solve the problem you are having @Vinson.
Note that as of a couple of weeks ago, the Spring Cloud extension has seen a 4.4 release. This version does use all the most recent versions of Spring Cloud and Spring Boot, thus likely resolving any versioning problems you are encountering.