Ejemplo n.º 1
0
        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; }));
        }
Ejemplo n.º 2
0
        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; }));
        }