I am attempting to setup a distributed command bus to connect to Consul and am having a heck of a time working through the examples and documentation. I am trying to get an example of how to setup the SpringCloudHttpBackupCommandRouter
and when I try to find anything on it within the apidocs it seems it disappears from the docs at version 4.4. Is this still the expected command router to use if attempting to connect to Consul?
Hi @squickone,
I am afraid that the SpringCloudHttpBackupCommandRouter
was indeed deprecated.
You can see the reasons why it was deprecated and what should be used on this PR.
Next to that, I believe this sample is the best source to help you at the moment!
Of course, we also have somethinig on the ref-guide that can be valuable!
KR,
Lucas, thank you for the response.
I have found in the reference doc provided mention of the CapabilityDiscoveryMode and a code snippet, but when I attempt to find where to pull that class from into my project I cannot find it within the 4.5 API docs. A bit perplexed where to obtain that class as well as looking at the code snippet I see use of a SpringCloudCommandRouter which I also cannot find reference to in the latest API docs.
Kind of lost now as to how to make a distributed command bus work using Spring Cloud.
UPDATE: Fun with Intellij sometimes. I finally found the missing dependencies brought in through the following maven dependency.
<dependency>
<groupId>org.axonframework.extensions.springcloud</groupId>
<artifactId>axon-springcloud</artifactId>
</dependency>
That did allow references to the two classes I noted before. Still missing from the API docs as I had to go through the PR and dive into the source files to determine where those dependencies were likely to be found.
No update yet if I got the distributed command bus with spring cloud working.
Thanks for the addon @squickone.
When you say you couldn’t find it on API docs, what do you mean?
Where are you looking for it?
All of it should be on the extension-springcloud
repo including javadoc and general APIs.
KR,
@squickone, perhaps you are already aware of those, but for the sake of future readers, I want to point two things out:
-
The
search.maven.org
allows you to search for a class using thec:
prefix. For example here is how to find all artifacts within allorg.axonframework.*
groups, containingCapabilityDiscoveryMode
class -
Since Axon Framework
4.5.0
, we have the Axon Bill of Materials which greatly simplifies the dependency management.
@lfgcampos - I have been searching the Axon Framework 4.4 API for references and some seem to be missing (CapabilityDiscoveryMode
) where their predecessors were once in earlier versions (SpringCloudHttpBackupCommandRouter
).
@milendyankov - Thank you for the guidance, I hadnt tried searching maven that way. I had tried looking in maven repository but my method was not very effective.
I am using the BOM and agree the versioning is much easier to manage.
thank you all for your assistance. I have gotten great responses to my questions here and have quickly become a fan of the framework.
Hey @squickone,
From AxonFramework v3 to v4 all the extensions were moved to it’s own repository/project.
So probably on v3.x
documentation you would still see the SpringCloud bit there while on v4.x
it is not anymore.
Probably that’s where the confusion is coming from.
Anyway, hope the examples above were enough for you to setup your project correctly.
If not, let us know!
KR,