If you're going to take that approach (and it's as reasonable as any I know of), you'll probably want to statically configure the network connector so that flowing messages happens even if there are no consumers for a given destination. Either that, or be prepared to leave the broker up for as long as it takes for all consumers to be active somewhere in the network.
Also, if you're using scheduled messages, this approach won't handle them, so you'll need to do something manual to handle them. Unfortunately there is no current management capability built into ActiveMQ 5.x that facilitates the process of moving clients and messages off of a broker. Maybe such a thing will get built in Artemis. Tim On Feb 26, 2018 6:14 AM, "ivo4311" <ivo4...@gmail.com> 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. Best regards, Ivelin Petkov -- Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html