I am trying to use the NServiceBus 3.0 ITimeoutState and IHandleTimeouts feature in my Saga. I have the following code snip. The following code working fine without any issue on NServiceBus.3.0.0-rc5. But, when i updated the DLLs with any version > 3.0.0 the saga timeout is not working as expected and it is throwing the following warning!
2012-04-05 09:15:26,267 [Worker.5] INFO NServiceBus.Sagas.Impl.SagaDispatcherFactory [(null)] <(null)> - Could not find a saga for the message type SomeNameSpace.MySagaTimeout with id 9496c29e-f745-4ada-8212-99e47324922b\20920. Going to invoke SagaNotFoundHandlers.
Please help me to resolve this issue.
The TimeoutMessage:
public class MySagaTimeout : ITimeoutState
{
public InputMessage1 Source { get; set; }
}
The Saga Code:
public class BrandMerchandisingRoot : Saga<MySagaState>,
IAmStartedByMessages<InputMessage1>,
IHandleTimeouts<MySagaTimeout>,
IHandleMessages<MySagaTimeout>
{
public void Handle(InputMessage1 message)
{
RequestUtcTimeout(5.Seconds(), new MySagaTimeout {Source = message});
}
public void Timeout(MySagaTimeout state)
{
//some other code here
}
public void Handle(MySagaTimeout message)
{
Timeout(message);
}
}
The Configuration:
Configure.With()
.StructureMapBuilder(ObjectFactory.Container)
.RunTimeoutManager()
.UseInMemoryTimeoutPersister()
.MsmqSubscriptionStorage()
.Sagas()
.UnicastBus();
NOTE: I am using my own saga persister and I have the implementation for IFindSagas<MySagaState>.Using<MySagaTimeout>