I'm still struggling to get started with rhino-esb. I've got an actor
that should be subscribed to a queue:
class WorkerProgram
{
static void Main()
{
var container = new WindsorContainer(new XmlInterpreter());//
read config from app.config
container.Kernel.AddFacility("worker.esb", new
RhinoServiceBusFacility());// wire up facility for rhino service bus
container.Register(Component.For<IMessageConsumer>().Named("Worker").ImplementedBy(typeof(Worker)));
var bus = container.Resolve<IStartableServiceBus>();
bus.Start();
Console.ReadLine();
}
}
and elsewhere:
public class Worker : ConsumerOf<Messages.VideoToEncode>
{
public void Consume(Messages.VideoToEncode message)
{
Console.WriteLine("{1} started", message.FileName);
System.Threading.Thread.Sleep(1000);
Console.WriteLine("{0} done", message.FileName);
}
}
and configured:
<facility id="worker.esb" >
<bus threadCount="1"
numberOfRetries="5"
endpoint="msmq://localhost/videotoencode"
queueIsolationLevel="ReadCommitted"
/>
<messages>
<add name="Messages.VideoToEncode"
endpoint="msmq://localhost/videotoencode2"/>
</messages>
</facility>
Upon running this, I see the "videotoencode2" queue is created, but
there are no subscriptions.
I've also got a requester application that puts messages into the
queue with a OnewayBus. THAT application seems to be working, except
all the messages go into discarded. I'm assuming it's because there
is no subscriber yet.
I'm pretty lost about what's going on here. Why am I defining two
endpoints in my configuration for the worker? What are some good
steps to start debugging this situation? I'm a bit new to IOC, so I
have no idea how to tell if it's even wiring up my consumer properly.
Any help would be appreciated.
--
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.