I'm hoping this will be an easy one for someone to point out that I've done something stupid!
I've recently tried to set up MassTransit on our systems here, but I'm having some issues with messages not being handled by my subscriber. The messages are handled fine up until the subscribing service gets restarted / redeployed, and after that they just don't work.
The Subscribing service is a Windows Service. I am using MSMQ along with the RuntimeServices bundled with MassTransit (v2.8).
I'm hoping I've missed something with regard to setting up a permanent subscription, but I've been hunting for more information without much luck.
Anyone have any idea if I've set something up wrong?
Here is the Initialization code:
Publishing Service
public static void Activate()
{
Bus.Initialize(bus =>
{
bus.UseMsmq(msmq => msmq.UseSubscriptionService("msmq://localhost/subscriptions"));
bus.UseControlBus();
bus.ReceiveFrom("msmq://localhost/our_webservice");
});
}
public static void Shutdown()
{
Bus.Shutdown();
}
Subscribing Service
private void ConfigureMessageBus()
{
Bus.Initialize(bus =>
{
bus.UseMsmq(msmq => msmq.UseSubscriptionService("msmq://localhost/subscriptions"));
bus.ReceiveFrom("msmq://localhost/commissionupdate_service");
bus.Subscribe(s => s.Consumer<CommissionUpdatedHandler>().Permanent());
});
}
protected override void OnStop()
{
Bus.Shutdown();
}
Please let me know if I can provide any more information that will help find the problem.
Thanks in advance! Jim.