As noted in the docs currently redistribution requires ON_DEMAND. There is
already a JIRA [1] to change this.

All things being equal, this would be really easy to implement with just a
few changes to
org.apache.activemq.artemis.core.postoffice.impl.BindingsImpl. However, it
would be inadvisable to change the semantics for existing users so I think
there would need to be a couple new message-load-balancing types (e.g.
STRICT_WITH_REDISTRIBUTION and OFF_WITH_REDISTRIBUTION). Semantics for the
existing types would stay the same.

Would you consider sending a PR? If not, I could probably find some time to
put one together.


Justin

[1] https://issues.apache.org/jira/browse/ARTEMIS-1925

On Wed, Nov 6, 2019 at 8:59 AM AntonR <anton.roskv...@volvo.com> wrote:

> Hi,
>
> I have set up a symmetrical Artemis cluster, running with lots of different
> clients and addresses. I want the clients to be able to connect to any of
> the brokers and receive messages sent to any other broker in the cluster.
> As
> such, it is is configured with message-load-balancing "ON_DEMAND" and
> redistribution-delay set to a positive integer.
>
> This works really well, but I have a problem with some of the clients that
> are running high message loads... To enable high throughput with them, they
> connect both consumers and producers to all cluster members for increased
> parallel throughput. This causes excessive forwards, as the "Initial
> distribution" of ON_DEMAND distributes all incoming messages to all
> brokers,
> since they all have active consumers on them.
>
> I want to be able to run the cluster with redistribution enabled, to cover
> the small clients scattered across the cluster, and no "Initial
> distribution" to inhibit excessive forwarding of the messages for the high
> volume clients.
>
> Is there a way to set this up?
>
> The  documentation
> <
> https://activemq.apache.org/components/artemis/documentation/2.10.0/clusters.html>
>
> for "message-load-balancing" states the following:
>
> "Keep in mind that this message forwarding/balancing is what we call
> "initial distribution." It is different than redistribution which is
> discussed below."
>
> And further down under "Message Redistribution" it says:
> "With message redistribution Apache ActiveMQ Artemis can be configured to
> automatically redistribute messages from queues which have no consumers
> back
> to other nodes in the cluster which do have matching consumers. To enable
> this functionality message-load-balancing must be ON_DEMAND"
>
> Can this be added as a feature flag instead, so I can have
> "message-load-balancing" "OFF" and still redistribute messages if consumers
> are missing on the local broker?
>
> Br,
> Anton
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>

Reply via email to