Using the DistributedCommandBus with JGroups

Hi all,

I have been trying to follow section 3.6 of the Axon user guide, “Distributing the Command Bus”, but to no avail. I am using the Spring Framework and thus the JGroupsConnectorFactoryBean. The JGroupsConnector never finds other members of the cluster; it prints that it is connecting to the cluster, but then each individual machine running the software seems to makes a cluster of one with itself and commands are not distributed. I’ve tried several XML files to configure JGroups to find each other, but no luck there. I have used the McastReceiverTest and McastSenderTest provided by JGroups to verify that my networking between machines using IP multicast is functional.

Does anyone have a working example of a configuration for the DistributedCommandBus with the JGroupsConnector they can share, including the XML file for JGroups configuration?

Thank you,

Hi James,

JGroups is easy when it works. Until then, it’s another story.
There is a sample in the Axon sources:

The xml file used is here:

Note that IPv6 doesn’t always work. Setting the system property: at startup helped for me.

Hope this helps.


How should one configure the IP addresses? In particular:


<TCPGOSSIP initial_hosts="[12001]" timeout="1500"/>

Do these configuration values vary across machines?


It reminds my difficulties with configuration.

I outlined some messy but working examples (progressively extended from quickstart by copying-and-pasting):

Hi James,

I’ve recently published a small Axon + JGroups + Docker demo here:

Note: this demo is based on the latest 3.0 milestone.