public async Task HandleAsync(IMessageContext <ChildSagaCompleted> context, CancellationToken cancellationToken = default) { _logger.LogInformation($"child saga completed, finalizing parent saga '{context.Message.CorrelationId}'..."); await Task.Delay(TimeSpan.FromSeconds(_random.Next(1, 5)), cancellationToken); var message = new ParentSagaCompleted(Guid.NewGuid(), context.Message.CorrelationId); this.Publish(message); }
public async Task HandleAsync(IMessageContext <ChildSagaCompleted> context, CancellationToken cancellationToken = default) { var message = new ParentSagaCompleted(Guid.NewGuid(), context.Message.CorrelationId); await this.Bus.PublishAsync(message, cancellationToken); }