public async Task <QueueMessageHandle> Pull(int timeoutSeconds = 10) { var item = await IOSubscriber.FetchOnce(Folder); if (item.Key == null) { return(null); } return(new QueueMessageHandle(item.Value, () => { item.Key.DeleteIfExists(); return Task.CompletedTask; })); }
public async Task <QueueMessageHandle <TMessage> > Pull <TMessage>(int timeoutSeconds = 10) where TMessage : IEventBusMessage { var item = await IOSubscriber <TMessage> .FetchOnce(Folder); if (item.Key == null) { return(null); } return(new QueueMessageHandle <TMessage>(item.Value, () => { item.Key.DeleteIfExists(); return Task.CompletedTask; })); }