Foundatio.AzureStorage icon indicating copy to clipboard operation
Foundatio.AzureStorage copied to clipboard

Peek/Message count/Get message

Open ghost opened this issue 5 years ago • 4 comments

How can you access those? Can i Peek messages as in AzureStorage? StartWorkingAsync description says it dequeues the messages, what if i just want to iterate over them?

ghost avatar Jan 20 '21 15:01 ghost

Hello,

Thanks for reaching out to us. Currently we don't have the ability to peek messages. What is your use cases for dequeueing a message but not doing anything with them? One danger with peeking them is when you have multiple consumers.

niemyjski avatar Jan 20 '21 19:01 niemyjski

Hi, Thanks for the reply.

i am replacing the Microsoft.Azure library with the Foundatio one and have some old code i need to support. I do not want to dequeue a message (sorry if that was not clear), i just want to get some details out of it and leave it in the queue "as is". For example:

  1. Getting the oldest queued message date/time (The question about message count/get date)
  2. Make sure a guid that is in the message is a valid Entity guid, before processing it (The one about peeking)

ghost avatar Jan 20 '21 19:01 ghost

@Rafael-Herscovici we don't currently have the ability to peek the next item in the queue abstraction. That seems like it might be a good feature to add, but we need to be careful because it needs to be implementable on all platforms that we support (Redis, SQS, ServiceBus, etc).

ejsmith avatar Jan 27 '21 16:01 ejsmith