On 02/26/2018 11:01 AM, ivo4311 wrote:
Hi,

I have the following scenario - A dynamically configured network of brokers
using the hub-and-spokes topology where each node is connected to the hub
with a duplex network connector.

Scaling up the network is straightforward - new nodes are created and they
connect to the hub (which has a url that is known to all the nodes).
Persistent adapters (kahadb) are created for each node.

Scaling down presents the problem of what to do with messages that are left
in the persistence of the nodes that have to be shut down.

Has anyone encountered such a use case before and if so please let me know
how you handled it :)? Currently I am considering starting a separate broker
that will connect to all of the left over persistence stores and pump the
messages to the hub (depending on consumer availability). This is mainly
because I cannot let the nodes that will be shut down take their time in
pumping out their messages (they will more or less be killed at once).

Any suggestions are welcome and will be much appreciated.


Hi,

Although not using ActiveMQ 5.x, we are using a similar topology in EnMasse (enmasse.io), where we use the ActiveMQ Artemis broker connecting into a 'hub' of Qpid Dispatch Routers using an outgoing AMQP connector.

The way enmasse supports scaling down at present is to have a 'scaledown hook' that runs during a grace period, when the broker is being shut down. This hook will then pump messages back to the hub. The downside is that the grace period have to be sufficiently long to be able to migrate the messages. On the other hand, in our case scaling down probably means there are little/few messages on the brokers. We are looking to add an additional state to the system to avoid this grace period.

If you cannot control the life cycle of the broker (i.e. define some extra 'terminating' state in your cluster manager where the broker is inactive but performs some shutdown procedure), I think spinning up a separate broker to do the pumping is an ok approach.

Best regards,

Ulf

Reply via email to