IT_User
IT_User

Reputation: 779

ActiveMQ Artemis federation appears to only attempt round-robin instead of full mesh

I setup a basic federated config using ActiveMQ Artemis. I noticed now that my mesh appears to be performing a round-robin (if I send a message on one broker, the message only gets sent to a single upstream connector and round robins between them).

My connectors look like:

  <connectors>
    <connector name="kit1-connector1">tcp://192.168.100.15:61618</connector>
    <connector name="kit2-connector1">tcp://192.168.100.16:61618</connector>
  </connectors>

My federation config looks like:

  <federations>
    <federation name="federated-jms">
      <upstream name="kit-1">
        <static-connectors>
          <connector-ref>kit1-connector1</connector-ref>
        </static-connectors>
        <policy ref="address-federation-policy" />
      </upstream>
      <upstream name="kit-2">
        <static-connectors>
          <connector-ref>kit2-connector1</connector-ref>
        </static-connectors>
        <policy ref="address-federation-policy" />
      </upstream>

      <policy-set name="address-federation-policy">
        <policy ref="federation-addresses" />
      </policy-set>

      <address-policy name="federation-addresses" max-hops="1">
        <include address-match="jms.topic.federated.#" />
      </address-policy>
    </federation>
  </federations>

Any thoughts why federation appears to be round-robin'ing instead of serving to all connectors in my mesh?

Upvotes: 0

Views: 284

Answers (1)

IT_User
IT_User

Reputation: 779

Ended up having to ensure each federated node had a different "federated name". They had to all be globally unique. Soon as that was in place, I showed success in all messages being transferred correctly.

https://activemq.apache.org/components/artemis/documentation/latest/federation-address.html

Upvotes: 0

Related Questions