public void Handle(RequestToRespondingSaga message) { if (Context.ReplyFromNonInitiatingHandler) { Data.CorrIdForRequest = message.SomeIdThatTheResponseSagaCanCorrelateBackToUs; //wont be needed in the future Bus.SendLocal(new SendReplyFromNonInitiatingHandler { SagaIdSoWeCanCorrelate = Data.Id }); return; } if (Context.ReplyFromTimeout) { Data.CorrIdForRequest = message.SomeIdThatTheResponseSagaCanCorrelateBackToUs; //wont be needed in the future RequestTimeout <DelayReply>(TimeSpan.FromSeconds(1)); return; } Data.CorrIdForRequest = Guid.NewGuid(); // Both reply and reply to originator work here since the sender of the incoming message is the requesting saga // also note we don't set the correlation ID since auto correlation happens to work for this special case // where we reply from the first handler Bus.Reply(new ResponseFromOtherSaga()); }
public Task Handle(RequestToRespondingSaga message, IMessageHandlerContext context) { return(context.SendLocal(new SendReplyFromNonInitiatingHandler { SagaIdSoWeCanCorrelate = Data.CorrIdForRequest })); }
public Task Handle(RequestToRespondingSaga message, IMessageHandlerContext context) { // Both reply and reply to originator work here since the sender of the incoming message is the requesting saga // also note we don't set the correlation ID since auto correlation happens to work for this special case // where we reply from the first handler return(context.Reply(new ResponseFromOtherSaga())); }
public Task Handle(RequestToRespondingSaga message, IMessageHandlerContext context) { // Both reply and reply to originator work here since the sender of the incoming message is the requesting saga // we explicitly set the correlation ID to a non-existent saga since auto correlation happens to work for this special case // where we reply from the first handler return(context.Reply(new ResponseFromOtherSaga { SomeCorrelationId = Guid.NewGuid() })); }
public async Task Handle(RequestToRespondingSaga message, IMessageHandlerContext context) { if (TestContext.ReplyFromNonInitiatingHandler) { await context.SendLocal(new SendReplyFromNonInitiatingHandler { SagaIdSoWeCanCorrelate = Data.Id }); } if (TestContext.ReplyFromTimeout) { await RequestTimeout <DelayReply>(context, TimeSpan.FromMilliseconds(1)); } // Both reply and reply to originator work here since the sender of the incoming message is the requesting saga // also note we don't set the correlation ID since auto correlation happens to work for this special case // where we reply from the first handler await context.Reply(new ResponseFromOtherSaga()); }
public Task Handle(RequestToRespondingSaga message, IMessageHandlerContext context) { return(RequestTimeout <DelayReply>(context, TimeSpan.FromMilliseconds(1))); }
public void Handle(RequestToRespondingSaga message) { Bus.Reply(new ResponseFromOtherSaga()); }
public void Handle(RequestToRespondingSaga message) { Bus.Reply(new ResponseFromOtherSaga { DataId = message.DataId }); }