public async Task Handle(IMessageContext context, PauseResumeMessage message) { context.Consumer.Pause(); await Task.Delay(Bootstrapper.MaxPollIntervalMs + 1000); MessageStorage.Add(message); context.Consumer.Resume(); }
public Task Handle(IMessageContext context, TestMessage1 message) { MessageStorage.Add(message); return(Task.CompletedTask); }
public async Task Handle(IMessageContext context, TestMessage2 message) { await Task.Delay(new Random().Next(1000)).ConfigureAwait(false); MessageStorage.Add(message); }