[
https://issues.apache.org/jira/browse/AMQNET-501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jim Gomes updated AMQNET-501:
-----------------------------
Fix Version/s: 1.8.0
> 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: ActiveMQ
> Affects Versions: 1.6.0
> Environment: Win 7 Pro SP 1
> Reporter: David Elliott
> Assignee: Jim Gomes
> Priority: Trivial
> Fix For: 1.8.0
>
>
> 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)