Uploaded image for project: 'ActiveMQ .Net'
  1. ActiveMQ .Net
  2. AMQNET-501

The InitialRedeliveryDelay doesn't seem to work.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Not A Problem
    • Affects Version/s: 1.6.0
    • Fix Version/s: None
    • Component/s: ActiveMQ
    • Labels:
      None
    • Environment:

      Win 7 Pro SP 1

      Description

      ActiveMQ v5.9.1
      Apache.NMS v1.6.0.3083

      The InitialRedeliveryDelay doesn't seem to work.
      I added a try...catch block to display the time and then re-throw so I could see what was going on.

      I'm looking to wait 5 seconds initially and then 5 seconds in between each attempt.
      You can see the first exception is immediately followed by the second and then 5 seconds in between.

      A first chance exception of type 'System.Collections.Generic.KeyNotFoundException' occurred in mscorlib.dll
      6/1/2015 11:59:00 AM
      A first chance exception of type 'System.Collections.Generic.KeyNotFoundException' occurred in mscorlib.dll
      6/1/2015 11:59:00 AM
      A first chance exception of type 'System.Collections.Generic.KeyNotFoundException' occurred in mscorlib.dll
      6/1/2015 11:59:05 AM
      A first chance exception of type 'System.Collections.Generic.KeyNotFoundException' occurred in mscorlib.dll
      6/1/2015 11:59:10 AM
      A first chance exception of type 'System.Collections.Generic.KeyNotFoundException' occurred in mscorlib.dll
      6/1/2015 11:59:16 AM
      A first chance exception of type 'System.Collections.Generic.KeyNotFoundException' occurred in mscorlib.dll
      6/1/2015 11:59:21 AM
      A first chance exception of type 'System.Collections.Generic.KeyNotFoundException' occurred in mscorlib.dll
      6/1/2015 11:59:26 AM

      Here is my code and values. It doesn't matter whether UseExponentialBackOff is on or off.

      var connectionFactory = new ConnectionFactory(_queueInfo.URI);
      connectionFactory.RedeliveryPolicy.MaximumRedeliveries = _queueInfo.RetryCount; // 6
      connectionFactory.RedeliveryPolicy.RedeliveryDelay(_queueInfo.RedeliveryDelay); // 5000
      connectionFactory.RedeliveryPolicy.InitialRedeliveryDelay = _queueInfo.RedeliveryDelay; // 5000
      connectionFactory.RedeliveryPolicy.BackOffMultiplier = _queueInfo.BackOffMultiplier; // 1
      connectionFactory.RedeliveryPolicy.UseExponentialBackOff = true;

      // _queueInfo.AcknowledgementMode = IndividualAcknowledge
      _connection = QueueConnectionFactory.CreateConnection(connectionFactory, _queueInfo.QueueName, _queueInfo.QueueParameters, _queueInfo.AcknowledgementMode);

        Attachments

          Activity

            People

            • Assignee:
              jgomes Jim Gomes
              Reporter:
              Webbert David Elliott
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: