Closed garethahealy closed 4 weeks ago
@guidograzioli i dont think i am setting anything wrong in the vars.
Looking at the code, the cluster-connections always expects to be localhost:
And the connectors just loops over whats provided:
which in my case, is the ansible inventory:
which means there will always be 3 items in the static-connectors
, where as there should be only 2.
I'll try to reproduce, however, unless something changed with the most recent version of artemis that was just updated, having three static-connectors for two node seems the correct configuration, which you can verify by running:
apache-artemis-2.32.0/bin/artemis create --clustered --staticCluster="tcp://server1:61616,tcp://server2:61616" test
which should produce:
<connectors>
<connector name="artemis">tcp://localhost:61616</connector>
<connector name = "node0">tcp://server1:61616</connector>
<connector name = "node1">tcp://server2:61616</connector>
</connectors>
<cluster-connections>
<cluster-connection name="my-cluster">
<connector-ref>artemis</connector-ref>
<message-load-balancing>ON_DEMAND</message-load-balancing>
<max-hops>0</max-hops>
<static-connectors>
<connector-ref>node0</connector-ref>
<connector-ref>node1</connector-ref>
</static-connectors>
</cluster-connection>
</cluster-connections>
Closing as not reproducible, welcome to reopen if you face the issue again.
Still re-producible 100% of the time.
Deploy: https://github.com/garethahealy/ansible-middleware-playground/blob/main/deploy-amq-clustered.yml Test: https://github.com/garethahealy/ansible-middleware-playground/blob/main/test-amq-clustered.yml
SUMMARY
If
amq_broker_ha_enabled
is enabled, the broker.xml generatesconnectors
andcluster-connections
which do not allow for message flow between nodes.ISSUE TYPE
ANSIBLE VERSION
COLLECTION VERSION
STEPS TO REPRODUCE
deploy-amq.yml
inventory/group_vars/all.yml
amq/bin/artemis consumer --user amq-broker --password amq-broker --message-count 500
amq/bin/artemis producer --user amq-broker --password amq-broker
EXPECTED RESULTS
Broker two and three get 500 messages each.
Ansible created samples, which don't allow for clustered broker:
Manually edited broker one sample.
The above config works, and broker two and three get 500 messages.