You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "Dondorp, Erwin" <er...@cgi.com> on 2021/05/28 13:42:25 UTC

connectionLoadBalancingPolicyClassName for federation connections

Hello,

We want to use the federation in a "fair" way and added connectionLoadBalancingPolicyClassName=org.apache.activemq.artemis.api.core.client.loadbalance.RandomConnectionLoadBalancingPolicy to the connection url. But we see that the connections are still always made to the first (available) broker that is mentioned in the url.
Is connectionLoadBalancingPolicyClassName supposed to work for federation connections?

Thx
Erwin

RE: connectionLoadBalancingPolicyClassName for federation connections

Posted by "Dondorp, Erwin" <er...@cgi.com>.
Domenico,

That is a very helpful answer, thanks!
(as we can stop searching for the cause)

e.

-----Oorspronkelijk bericht-----
Van: Domenico Francesco Bruscino <br...@gmail.com> 
Verzonden: vrijdag 28 mei 2021 16:52
Aan: users@activemq.apache.org
Onderwerp: Re: connectionLoadBalancingPolicyClassName for federation connections


EXTERNAL SENDER:   Do not click any links or open any attachments unless you trust the sender and know the content is safe.
EXPÉDITEUR EXTERNE:    Ne cliquez sur aucun lien et n’ouvrez aucune pièce jointe à moins qu’ils ne proviennent d’un expéditeur fiable, ou que vous ayez l'assurance que le contenu provient d'une source sûre.

Hi Erwin,

looking at the source code[1] the server side connector ignores all addresses other than the first one. I would add a connector for each server.

[1]
https://urldefense.com/v3/__https://github.com/apache/activemq-artemis/blob/2.17.0/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java*L1473__;Iw!!AaIhyw!5ul0eC1AvE7tyx7K1IeC1d2auXx8NpQ_sDii4FS6Hc3_Wu7UxNE83UKhkJgB3rAu$ 

Regards,
Domenico

On Fri, 28 May 2021 at 15:42, Dondorp, Erwin <er...@cgi.com> wrote:

> Hello,
>
> We want to use the federation in a "fair" way and added 
> connectionLoadBalancingPolicyClassName=org.apache.activemq.artemis.api
> .core.client.loadbalance.RandomConnectionLoadBalancingPolicy
> to the connection url. But we see that the connections are still 
> always made to the first (available) broker that is mentioned in the url.
> Is connectionLoadBalancingPolicyClassName supposed to work for 
> federation connections?
>
> Thx
> Erwin
>

Re: connectionLoadBalancingPolicyClassName for federation connections

Posted by Domenico Francesco Bruscino <br...@gmail.com>.
Hi Erwin,

looking at the source code[1] the server side connector ignores all
addresses other than the first one. I would add a connector for each server.

[1]
https://github.com/apache/activemq-artemis/blob/2.17.0/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java#L1473

Regards,
Domenico

On Fri, 28 May 2021 at 15:42, Dondorp, Erwin <er...@cgi.com> wrote:

> Hello,
>
> We want to use the federation in a "fair" way and added
> connectionLoadBalancingPolicyClassName=org.apache.activemq.artemis.api.core.client.loadbalance.RandomConnectionLoadBalancingPolicy
> to the connection url. But we see that the connections are still always
> made to the first (available) broker that is mentioned in the url.
> Is connectionLoadBalancingPolicyClassName supposed to work for federation
> connections?
>
> Thx
> Erwin
>