Jake
This is a snippet from my Message Consumer registration that runs in my
bootstrapper (my consumers do not reside in the same assembly as my
bootstrapper). Hope it helps some.

public void RegisterFrom(IKernel kernel, Assembly[] assemblies)
        {
            foreach (var assembly in assemblies)
            {
                kernel.Register(
                    AllTypes
                        .FromAssembly(assembly)
                        .Where(type => typeof
(IMessageConsumer).IsAssignableFrom(type) &&
                                       typeof
(IOccasionalMessageConsumer).IsAssignableFrom(type) == false &&
                                       typeof
(IRequireSpecialMessageConsumerRegistration).IsAssignableFrom(type) ==
                                       false &&

IsTypeAcceptableForThisBootStrapper(type))
                        .Configure(reg =>
reg.Named(reg.Implementation.FullName).LifeStyle.Transient));
                kernel.Register(
                    AllTypes.FromAssembly(assembly)
                        .BasedOn(typeof (ISagaFinder<,>))
                        .WithService.FirstInterface()
                        .Configure(reg => reg.Named(reg.Implementation.Name
).LifeStyle.Transient));
            }
        }


On Wed, Jun 2, 2010 at 9:26 AM, Ayende Rahien <[email protected]> wrote:

> using (var bus = _container.Resolve<IStartableServiceBus>())
>
> this is a real bus, you only need to use OneWayBus, not StartableServiceBus
>
> On Wed, Jun 2, 2010 at 7:22 PM, JakeS <[email protected]> wrote:
>
>> Ok.
>>
>> Now it looks like the "requester" app is still pulling messages from
>> the queue, even though I'm using a OnewayBus.  If I put a log of
>> messages into the queue at once, my worker process will get some, but
>> the requester process itself also seems to get a few:
>>
>> [6080] REQUESTER: ERROR Rhino.ServiceBus.Impl.DefaultServiceBus
>> [(null)] Got message RhinoESBTest.Core.Messages.VideoToEncode, but had
>> no consumers for it
>>
>> I'm setting up the requester the same way I see it in
>> CanSendMsgsFromOneWayBus:
>>
>> using (var bus = _container.Resolve<IStartableServiceBus>())
>> {
>>    bus.Start();
>>    var oneWay = new OnewayBus(new[]
>>       {
>>           new MessageOwner
>>               {
>>                   Endpoint = bus.Endpoint.Uri,
>>                   Name = "RhinoESBTest.Core.Messages.VideoToEncode",
>>               },
>>       }, new MessageBuilder(_container.Resolve<IMessageSerializer>(),
>> null));
>>    oneWay.Send(videoToEncode);
>> }
>>
>>
>>
>> On Jun 2, 11:11 am, Ayende Rahien <[email protected]> wrote:
>> > The issue was that RSB looks for the match in the service, not the impl.
>> > When you registered IMessageConsumer, it couldn't find the appropriate
>> ione
>>
>> --
>> 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]<rhino-tools-dev%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/rhino-tools-dev?hl=en.
>>
>>
>  --
> 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]<rhino-tools-dev%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rhino-tools-dev?hl=en.
>

-- 
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