I have an NServiceBus Saga that looks like this
public class MySaga : Saga<MySagaData>,
IAmStartedByMessages<MyStartMessage>,
开发者_JAVA百科 IHandleMessages<OtherMessage>
But messages can come out of order. So what happens when the IAmStartedBy Message comes after the IHandle Message? There will be no SagaData for OtherMessage. Will NServiceBus swallow the message or try to re-handle it later?
NServiceBus will fail to find an active saga for OtherMessage, retry the configured number of times and then put the message in the error queue. The retries might delay long enough for MyStartMessage to arrive. Any reason why OtherMessage can't start the saga as well? (you can have multiple messages that can start a saga)
精彩评论