title: ActiveMQ broker redelivery vs consumer redelivery
body: <p>I'm trying to understand the difference between <code>ActiveMQ</code> <code>redeliveryPlugin</code> and consumer's attempt to recieve messages before it marks it as a poison pill. What's the difference. In <a href="http://activemq.apache.org/message-redelivery-and-dlq-handling.html" rel="noreferrer">the documentation</a> there'is an example:</p>
  
  <pre><code>&lt;broker xmlns="http://activemq.apache.org/schema/core"    schedulerSupport="true" &gt;
          .... 
          &lt;plugins&gt;
              &lt;redeliveryPlugin fallbackToDeadLetter="true" sendToDlqIfMaxRetriesExceeded="true"&gt;
                  &lt;redeliveryPolicyMap&gt;
                      &lt;redeliveryPolicyMap&gt;
                          &lt;redeliveryPolicyEntries&gt;
                              &lt;!-- a destination specific policy --&gt;
                              &lt;redeliveryPolicy queue="SpecialQueue" maximumRedeliveries="4"
  redeliveryDelay="10000" /&gt;
                          &lt;/redeliveryPolicyEntries&gt;
                          &lt;!-- the fallback policy for all other destinations --&gt;
                          &lt;defaultEntry&gt;
                              &lt;redeliveryPolicy maximumRedeliveries="4" initialRedeliveryDelay="5000"
  redeliveryDelay="10000" /&gt;
                          &lt;/defaultEntry&gt;
                      &lt;/redeliveryPolicyMap&gt;
                  &lt;/redeliveryPolicyMap&gt;
              &lt;/redeliveryPlugin&gt;
          &lt;/plugins&gt;
  </code></pre>
  
  <p>Now, I uderstand the broker's redelivery system as a separate to the client's one. For instance, after making 6 attempts (by default) to acknowledge a message (<code>CLIENT_ACKNOWLDGMENT</code> mode) the consumer send a poison pill. So, is it true that after receiving the poison pill, broker will try to resend the message to the consumer which will make another 6 attempt.</p>
  
  <p>So, in total we may have <code>4 x 6 = 24</code> attempts before the message will send to a <code>DLQ</code>.</p>
  
  <p>Is my understading correct?</p>