title: Clustered ActiveMQ Artemis and producer/consumer load balancing configuration when broker fails
body: <p>I have created an ActiveMQ Artemis cluster with two active brokers. I have created a custom load balancer to be able to initially distribute my queues in a static way according to my requirements and workload.</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;connectors&gt;
    &lt;connector name=&quot;broker1-connector&quot;&gt;tcp://myhost1:61616&lt;/connector&gt;
    &lt;connector name=&quot;broker2-connector&quot;&gt;tcp://myhost2:62616&lt;/connector&gt;
  &lt;/connectors&gt;
  
  &lt;cluster-connections&gt;
    &lt;cluster-connection name=&quot;myhost1-cluster&quot;&gt;
      &lt;connector-ref&gt;broker1-connector&lt;/connector-ref&gt;
      &lt;retry-interval&gt;500&lt;/retry-interval&gt;
      &lt;use-duplicate-detection&gt;true&lt;/use-duplicate-detection&gt;
      &lt;message-load-balancing&gt;ON_DEMAND&lt;/message-load-balancing&gt;
      &lt;max-hops&gt;1&lt;/max-hops&gt;
      &lt;static-connectors&gt;
        &lt;connector-ref&gt;broker2-connector&lt;/connector-ref&gt;
      &lt;/static-connectors&gt;
    &lt;/cluster-connection&gt;
  &lt;/cluster-connections&gt;
  </code></pre>
  <p>My issue is that when broker1 is down then based on this topology I can recreate its queues on broker2 to avoid losing messages (by using connection string on producer <code>(tcp://myhost1:61616,tcp://myhost2:62616)</code>).</p>
  <p>But then when broker1 becomes available again my producer is unaware of that and it stills uses the connection to broker2 (if that matters broker2 <code>redistribution-delay</code> is set to 0 and no consumers are registered). Is there a way or some configuration to resume my producer to write only to broker1.</p>
  <p>This affects my consumers which are initially connected to broker1, and I am not sure if there is also some way/configuration to make them transparently bounce between these brokers or do I need to create two consumers (effectively one them will be idle) each one targeting the corresponding broker ?</p>