This line:
+               internal static void InitializeSubQueues(Uri endpoint, bool
transactional)
+               {
+                       var siblingQueues = new[] {"#errors", "#discarded", 
"#timeout"};
+                       foreach(var sibling in siblingQueues)
+                       {
+                               new Uri(endpoint.ToString() + 
sibling).CreateQueue
(transactional,QueueAccessMode.Peek).Close();
+                       }
+               }
+

Is missing the #subscriptions subqueue. There are five total queues
created for a specific endpoint, though I believe right now flatqueue
strategy doesn't participate in timeout handling...that may be fixed
now.


On Jan 20, 4:00 pm, chrisortman <[email protected]> wrote:
> As of right now it is not.
> I also posted it as a zip file in this 
> threadhttp://groups.google.com/group/rhino-tools-dev/browse_frm/thread/5b03...
>
> If you have trouble applying you can download a copy of my repo from
> herehttp://github.com/chrisortman/rhino-tools/tree/master
>
> On Jan 20, 3:33 pm, lars kolsaker <[email protected]> wrote:
>
> > Is this patch added to the trunk ?
>
> > On Jan 19, 8:06 pm, Ayende Rahien <[email protected]> wrote:
>
> > > Please zip it here.
> > > Mike, can you review that?
>
> > > On Mon, Jan 19, 2009 at 2:02 PM, chrisortman <[email protected]> 
> > > wrote:
>
> > > > Here's a patch for that
>
> > > > From 5dc1b09401ae6e9c5cd719025c57121dd293aa34 Mon Sep 17 00:00:00 2001
> > > > From: Chris Ortman <[email protected]>
> > > > Date: Mon, 19 Jan 2009 13:00:33 -0600
> > > > Subject: [PATCH] Allows the FlatQueueStrategy to create its subqueues
> > > > on demand.
>
> > > > ---
> > > >  .../MsmqFlatQueueTestBase.cs                       |   67 +++++++++
> > > > +----------
> > > >  ...rializableMessageWillBeForwardedToErrorQueue.cs |    1 +
> > > >  .../Impl/RhinoServiceBusFacility.cs                |    8 +++
> > > >  .../Rhino.ServiceBus/Msmq/FlatQueueStrategy.cs     |   17 ++++-
> > > >  .../Rhino.ServiceBus/Msmq/IInitializeSubQueues.cs  |   33 ++++++++++
> > > >  .../Rhino.ServiceBus/Msmq/IQueueStrategy.cs        |    1 +
> > > >  .../Rhino.ServiceBus/Msmq/MsmqExtensions.cs        |    8 ++-
> > > >  .../Rhino.ServiceBus/Msmq/MsmqTransport.cs         |   14 ++++
> > > >  .../Rhino.ServiceBus/Msmq/MsmqUtil.cs              |    4 +-
> > > >  .../Rhino.ServiceBus/Msmq/SubQueueStrategy.cs      |    5 ++
> > > >  .../Rhino.ServiceBus/Rhino.ServiceBus.csproj       |    1 +
> > > >  11 files changed, 119 insertions(+), 40 deletions(-)
> > > >  create mode 100644 rhino-service.bus/Rhino.ServiceBus/Msmq/
> > > > IInitializeSubQueues.cs
>
> > > > diff --git a/rhino-service.bus/Rhino.ServiceBus.Tests/
> > > > MsmqFlatQueueTestBase.cs b/rhino-service.bus/Rhino.ServiceBus.Tests/
> > > > MsmqFlatQueueTestBase.cs
> > > > index a08b167..0f0f89a 100644
> > > > --- a/rhino-service.bus/Rhino.ServiceBus.Tests/
> > > > MsmqFlatQueueTestBase.cs
> > > > +++ b/rhino-service.bus/Rhino.ServiceBus.Tests/
> > > > MsmqFlatQueueTestBase.cs
> > > > @@ -64,46 +64,47 @@ namespace Rhino.ServiceBus.Tests
> > > >             if (MessageQueue.Exists(transactionalTestQueuePath) ==
> > > > false)
> > > >                 MessageQueue.Create(transactionalTestQueuePath,
> > > > true);
>
> > > > -            if (MessageQueue.Exists(testQueuePath + errorsPathSuffix)
> > > > == false)
> > > > -                MessageQueue.Create(testQueuePath +
> > > > errorsPathSuffix);
> > > > -
> > > > -            if (MessageQueue.Exists(testQueuePath2 +
> > > > errorsPathSuffix) == false)
> > > > -                MessageQueue.Create(testQueuePath2 +
> > > > errorsPathSuffix);
> > > > -
> > > > -            if (MessageQueue.Exists(transactionalTestQueuePath +
> > > > errorsPathSuffix) == false)
> > > > -                MessageQueue.Create(transactionalTestQueuePath +
> > > > errorsPathSuffix, true);
> > > > -
> > > > -            if (MessageQueue.Exists(testQueuePath +
> > > > discardedPathSuffix) == false)
> > > > -                MessageQueue.Create(testQueuePath +
> > > > discardedPathSuffix);
>
> > > >             queue = new MessageQueue(testQueuePath);
> > > >             queue.Purge();
>
> > > > -            using (var errQueue = new MessageQueue(testQueuePath +
> > > > errorsPathSuffix))
> > > > -            {
> > > > -                errQueue.Purge();
> > > > -            }
> > > > -
> > > > -            using (var discardedQueue = new MessageQueue
> > > > (testQueuePath + discardedPathSuffix))
> > > > -            {
> > > > -                discardedQueue.Purge();
> > > > -            }
> > > > -
> > > > -            testQueue2 = new MessageQueue(testQueuePath2);
> > > > +
> > > > if(MessageQueue.Exists(testQueuePath+ errorsPathSuffix))
> > > > +                                               {
> > > > +                                                       using (var 
> > > > errQueue
> > > > = new MessageQueue(testQueuePath +
> > > > errorsPathSuffix))
> > > > +                                                       {
> > > > +
> > > > errQueue.Purge();
> > > > +                                                       }
> > > > +                                               }
> > > > +
> > > > +
> > > > if(MessageQueue.Exists(testQueuePath+discardedPathSuffix))
> > > > +                                       {
> > > > +                                               using (var 
> > > > discardedQueue =
> > > > new MessageQueue(testQueuePath +
> > > > discardedPathSuffix))
> > > > +                                               {
> > > > +
> > > > discardedQueue.Purge();
> > > > +                                               }
> > > > +                                       }
> > > > +
> > > > +               testQueue2 = new MessageQueue(testQueuePath2);
> > > >             testQueue2.Purge();
>
> > > > -            using (var errQueue2 = new MessageQueue(testQueuePath2 +
> > > > errorsPathSuffix))
> > > > -            {
> > > > -                errQueue2.Purge();
> > > > -            }
> > > > +
> > > > if(MessageQueue.Exists(testQueuePath2+errorsPathSuffix))
> > > > +                                       {
> > > > +                                               using (var errQueue2 = 
> > > > new
> > > > MessageQueue(testQueuePath2 +
> > > > errorsPathSuffix))
> > > > +                                               {
> > > > +                                                       
> > > > errQueue2.Purge();
> > > > +                                               }
> > > > +                                       }
>
> > > > -            transactionalQueue = new MessageQueue
> > > > (transactionalTestQueuePath);
> > > > +               transactionalQueue = new MessageQueue
> > > > (transactionalTestQueuePath);
> > > >             transactionalQueue.Purge();
>
> > > > -            using (var errQueue3 = new MessageQueue
> > > > (transactionalTestQueuePath + errorsPathSuffix))
> > > > -            {
> > > > -                errQueue3.Purge();
> > > > -            }
> > > > +               if (MessageQueue.Exists(transactionalTestQueuePath +
> > > > errorsPathSuffix))
> > > > +               {
> > > > +                       using (var errQueue3 = new MessageQueue
> > > > (transactionalTestQueuePath + errorsPathSuffix))
> > > > +                       {
> > > > +                               errQueue3.Purge();
> > > > +                       }
> > > > +               }
>
> > > >             subscriptions = new MessageQueue(subbscriptionQueuePath)
> > > >             {
> > > > @@ -122,7 +123,7 @@ namespace Rhino.ServiceBus.Tests
> > > >                         new XmlMessageSerializer(
> > > >                             new DefaultReflection(),
> > > >                             new DefaultKernel()), TestQueueUri, 1,
> > > > -                        DefaultMessageActions(TestQueueUri));
> > > > +                        DefaultMessageActions(TestQueueUri))
> > > > { SubQueueInitializer = new FlatQueueSubQueueInitializer()};
> > > >                     transport.Start();
> > > >                 }
> > > >                 return transport;
> > > > @@ -150,7 +151,7 @@ namespace Rhino.ServiceBus.Tests
> > > >                 if (transactionalTransport == null)
> > > >                 {
> > > >                     transactionalTransport = new MsmqTransport(new
> > > > XmlMessageSerializer(new DefaultReflection(), new DefaultKernel()),
> > > > -
> > > > TransactionalTestQueueUri, 1, DefaultMessageActions
> > > > (TransactionalTestQueueUri));
> > > > +
> > > > TransactionalTestQueueUri, 1, DefaultMessageActions
> > > > (TransactionalTestQueueUri) ){ SubQueueInitializer = new
> > > > FlatQueueSubQueueInitializer()};
> > > >                     transactionalTransport.Start();
> > > >                 }
> > > >                 return transactionalTransport;
> > > > diff --git a/rhino-service.bus/Rhino.ServiceBus.Tests/
> > > > UnserializableMessageWillBeForwardedToErrorQueue.cs b/rhino-
> > > > service.bus/Rhino.ServiceBus.Tests/
> > > > UnserializableMessageWillBeForwardedToErrorQueue.cs
> > > > index 60110b7..04db6a9 100644
> > > > --- a/rhino-service.bus/Rhino.ServiceBus.Tests/
> > > > UnserializableMessageWillBeForwardedToErrorQueue.cs
> > > > +++ b/rhino-service.bus/Rhino.ServiceBus.Tests/
> > > > UnserializableMessageWillBeForwardedToErrorQueue.cs
> > > > @@ -36,6 +36,7 @@ namespace Rhino.ServiceBus.Tests
> > > >             Assert.True(wasCalled);
> > > >         }
> > > >     }
> > > > +
> > > >     public class
> > > > UnserializableMessageWillBeForwardedToFlattenedErrorQueue :
> > > > MsmqFlatQueueTestBase
> > > >     {
> > > >         [Fact]
> > > > diff --git a/rhino-service.bus/Rhino.ServiceBus/Impl/
> > > > RhinoServiceBusFacility.cs b/rhino-service.bus/Rhino.ServiceBus/Impl/
> > > > RhinoServiceBusFacility.cs
> > > > index 30a791a..b39ba30 100644
> > > > --- a/rhino-service.bus/Rhino.ServiceBus/Impl/
> > > > RhinoServiceBusFacility.cs
> > > > +++ b/rhino-service.bus/Rhino.ServiceBus/Impl/
>
> ...
>
> read more »
--~--~---------~--~----~------------~-------~--~----~
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