You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "David Elliott (JIRA)" <ji...@apache.org> on 2015/06/03 20:02:38 UTC
[jira] [Created] (AMQNET-501) The InitialRedeliveryDelay doesn't
seem to work.
David Elliott created AMQNET-501:
------------------------------------
Summary: The InitialRedeliveryDelay doesn't seem to work.
Key: AMQNET-501
URL: https://issues.apache.org/jira/browse/AMQNET-501
Project: ActiveMQ .Net
Issue Type: Bug
Components: NMS
Affects Versions: 1.6.0
Environment: Win 7 Pro SP 1
Reporter: David Elliott
Assignee: Jim Gomes
Priority: Trivial
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);
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)