Broker redelivery - messages lost on broker restart

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Broker redelivery - messages lost on broker restart

j.kupka
Hello,

I cofigured redelivery policy through Redelivery plugin. Everything works as
expected except the scenario when the broker is restarted while there are
messages scheduled for re-delivery. Those messages are getting lost, they
are nowhere to be found, not in primary queue or DLQ. I am using persistent
delivery mode for all messages, vm transport (boker, producers and consumers
all run in the same JVM). AMQ version 5.8.0. I thought it is the
responsibility of jobSchedulerStore to save pending jobs so they survive
restart, but the log says no jobs are firing after the broker starts. I
checked the scheduler store directory, there are some files there and they
are being updated while broker is running, but I'm not sure what is stored
in them. Is there any configuration option I could try, or is this the
expected behaviour? Thanks.
Here is my broker configuration:
  <broker id="broker" xmlns="http://activemq.apache.org/schema/core"
  brokerName="localhost2"
  persistent="true"
    schedulerSupport="true"
    useJmx="true"
    enableStatistics="true">
   
    <destinations>
      <queue physicalName="preferredAsyncMessages" />
    </destinations>

    <destinationPolicy>
      <policyMap>
        <policyEntries>
          <policyEntry queue=">" prioritizedMessages="true"/>
        </policyEntries>
      </policyMap>
    </destinationPolicy>
   
    <managementContext>
      <managementContext createConnector="true" connectorPort="1098"/>
    </managementContext>
   
    <plugins>
      <statisticsBrokerPlugin/>
     
      <redeliveryPlugin fallbackToDeadLetter="false"
sendToDlqIfMaxRetriesExceeded="true">
        <redeliveryPolicyMap>
          <redeliveryPolicyMap>
            <redeliveryPolicyEntries>
              <redeliveryPolicy queue="preferredAsyncMessages"
                maximumRedeliveries="10"
                initialRedeliveryDelay="10000">
            </redeliveryPolicyEntries>

            <defaultEntry>
              <redeliveryPolicy maximumRedeliveries="10"
                initialRedeliveryDelay="60000"
                redeliveryDelay="1200000"/>
            </defaultEntry>
          </redeliveryPolicyMap>
        </redeliveryPolicyMap>
      </redeliveryPlugin>
    </plugins>
  </broker>



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Reply | Threaded
Open this post in threaded view
|

Re: Broker redelivery - messages lost on broker restart

tabish121@gmail.com

5.8.0 is quite old, try moving to a new broker release.

On 04/20/2018 02:30 PM, j.kupka wrote:

> Hello,
>
> I cofigured redelivery policy through Redelivery plugin. Everything works as
> expected except the scenario when the broker is restarted while there are
> messages scheduled for re-delivery. Those messages are getting lost, they
> are nowhere to be found, not in primary queue or DLQ. I am using persistent
> delivery mode for all messages, vm transport (boker, producers and consumers
> all run in the same JVM). AMQ version 5.8.0. I thought it is the
> responsibility of jobSchedulerStore to save pending jobs so they survive
> restart, but the log says no jobs are firing after the broker starts. I
> checked the scheduler store directory, there are some files there and they
> are being updated while broker is running, but I'm not sure what is stored
> in them. Is there any configuration option I could try, or is this the
> expected behaviour? Thanks.
> Here is my broker configuration:
>    <broker id="broker" xmlns="http://activemq.apache.org/schema/core"
>     brokerName="localhost2"
>     persistent="true"
>      schedulerSupport="true"
>      useJmx="true"
>      enableStatistics="true">
>      
>      <destinations>
>        <queue physicalName="preferredAsyncMessages" />
>      </destinations>
>
>      <destinationPolicy>
>        <policyMap>
>          <policyEntries>
>            <policyEntry queue=">" prioritizedMessages="true"/>
>          </policyEntries>
>        </policyMap>
>      </destinationPolicy>
>      
>      <managementContext>
>        <managementContext createConnector="true" connectorPort="1098"/>
>      </managementContext>
>      
>      <plugins>
>        <statisticsBrokerPlugin/>
>        
>        <redeliveryPlugin fallbackToDeadLetter="false"
> sendToDlqIfMaxRetriesExceeded="true">
>          <redeliveryPolicyMap>
>            <redeliveryPolicyMap>
>              <redeliveryPolicyEntries>
>                <redeliveryPolicy queue="preferredAsyncMessages"
>                  maximumRedeliveries="10"
>                  initialRedeliveryDelay="10000">
>              </redeliveryPolicyEntries>
>
>              <defaultEntry>
>                <redeliveryPolicy maximumRedeliveries="10"
>                  initialRedeliveryDelay="60000"
>                  redeliveryDelay="1200000"/>
>              </defaultEntry>
>            </redeliveryPolicyMap>
>          </redeliveryPolicyMap>
>        </redeliveryPlugin>
>      </plugins>
>    </broker>
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>

--
Tim Bish
twitter: @tabish121
blog: http://timbish.blogspot.com/

Reply | Threaded
Open this post in threaded view
|

Re: Broker redelivery - messages lost on broker restart

j.kupka
Thanks for the reply. I tried version 5.14.5, since I am limited to java 7,
and now it's working as expected.



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html