title: Are there any benefits in using the "failover:" protocol with the "vm:" transport in ActiveMQ?
body: <p>According to <a href="https://stackoverflow.com/a/16943198/1228454">this answer</a>, there are benefits from using the "failover" protocol with a "tcp" transport, even with a single address.</p>
  
  <p>In addition to this, the <a href="http://activemq.apache.org/how-do-i-configure-automatic-reconnection.html" rel="nofollow noreferrer">ActiveMQ documentation</a>, the following applies (emphasis mine):</p>
  
  <blockquote>
    <p>If a JMS broker goes down, ActiveMQ can automatically reconnect to an available JMS broker using the failover: protocol. Not only does this automatically reconnect, it will <strong>also resume any temporary destinations, sessions, producers and most importantly consumers</strong>.</p>
  </blockquote>
  
  <p>Does this also apply when using the "vm" transport?</p>
  
  <p>We are seeing frequent issues with queue consumers stopping to pick up messages, while the queue fills up, and we have not found a fix for this yet. This is with ActiveMQ v5.6.0 - we're upgrading to v5.14.5 at the moment, but want to explore additional options, too.</p>
  
  <p>Our current Spring configuration for the ActiveMQConnectionFactory looks like this:</p>
  
  <pre><code>&lt;bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"
      depends-on="amqEmbeddedBroker"&gt;
      &lt;property name="brokerURL" value="vm://localhost" /&gt;
      &lt;property name="watchTopicAdvisories" value="false" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Would changing the URL from <code>vm://localhost</code> to <code>failover:(vm://localhost)</code> provide any benefit in this case, i.e. safe-guarding against connections being closed for whatever reason? When changing the URL to include the <code>failover:</code> part, I can see that an instance of <code>FailoverTransport</code> is created, but does it provide any benefit in the case of the <code>vm</code> transport?</p>