Um,
I think there is a bug in TimeoutAction, timeout messages should go to the
timeout queue, not the discarded queue

On Thu, Apr 9, 2009 at 4:44 PM, <[email protected]> wrote:

>
> Revision: 2133
>
> http://rhino-tools.svn.sourceforge.net/rhino-tools/?rev=2133&view=rev
> Author:   CoreyKaylor
> Date:     2009-04-09 13:44:13 +0000 (Thu, 09 Apr 2009)
>
> Log Message:
> -----------
> Fixed a bug when a message with no consumers was put in the Discarded queue
> and the service bus was restarted resulting in a NullReferenceException.
> Renamed unit test to reflect more accurately what it was testing.
>
> Modified Paths:
> --------------
>    trunk/esb/Rhino.ServiceBus/RhinoQueues/TimeoutAction.cs
>
>  
> trunk/esb/Rhino.ServiceBus.Tests/RhinoQueues/RhinoQueue_Messages_that_have_no_handlers.cs
>
> Modified: trunk/esb/Rhino.ServiceBus/RhinoQueues/TimeoutAction.cs
> ===================================================================
> --- trunk/esb/Rhino.ServiceBus/RhinoQueues/TimeoutAction.cs     2009-04-08
> 23:15:42 UTC (rev 2132)
> +++ trunk/esb/Rhino.ServiceBus/RhinoQueues/TimeoutAction.cs     2009-04-09
> 13:44:13 UTC (rev 2133)
> @@ -27,7 +27,10 @@
>             {
>                 foreach (var message in
> queue.GetAllMessages(SubQueue.Discarded.ToString()))
>                 {
> -                    var timeToSend =
> XmlConvert.ToDateTime(message.Headers["time-to-send"],XmlDateTimeSerializationMode.Utc);
> +                       var timeToSendHeader =
> message.Headers["time-to-send"];
> +
> if(string.IsNullOrEmpty(timeToSendHeader))
> +                                               continue;
> +                    var timeToSend =
> XmlConvert.ToDateTime(timeToSendHeader,XmlDateTimeSerializationMode.Utc);
>                     logger.DebugFormat("Registering message {0} to be sent
> at {1} on {2}",
>                                   message.Id, timeToSend, queue.QueueName);
>                     writer.Add(timeToSend, message.Id);
>
> Modified:
> trunk/esb/Rhino.ServiceBus.Tests/RhinoQueues/RhinoQueue_Messages_that_have_no_handlers.cs
> ===================================================================
> ---
> trunk/esb/Rhino.ServiceBus.Tests/RhinoQueues/RhinoQueue_Messages_that_have_no_handlers.cs
>   2009-04-08 23:15:42 UTC (rev 2132)
> +++
> trunk/esb/Rhino.ServiceBus.Tests/RhinoQueues/RhinoQueue_Messages_that_have_no_handlers.cs
>   2009-04-09 13:44:13 UTC (rev 2133)
> @@ -1,16 +1,12 @@
>  using System;
>  using System.IO;
> -using System.Messaging;
>  using Castle.Windsor;
>  using Castle.Windsor.Configuration.Interpreters;
>  using Rhino.ServiceBus.Impl;
>  using Rhino.ServiceBus.Internal;
>  using Rhino.ServiceBus.RhinoQueues;
>  using Rhino.ServiceBus.Tests.RhinoQueues;
> -using Rhino.ServiceBus.Transport;
>  using Xunit;
> -using Rhino.Queues;
> -using System.Net;
>  using System.Threading;
>
>  namespace Rhino.ServiceBus.Tests
> @@ -33,7 +29,7 @@
>
>
>         [Fact]
> -        public void Should_go_to_discard_sub_queue()
> +        public void
> Should_go_to_discard_sub_queue_and_be_able_to_restart_bus()
>         {
>             using (var bus = container.Resolve<IStartableServiceBus>())
>             {
>
>
> This was sent by the SourceForge.net collaborative development platform,
> the world's largest Open Source development site.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rhino-tools-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to