question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CloudQueue.DeleteMessageAsync(CloudQueueMessage) for message that became visible

See original GitHub issue

Scenario 1

  1. msg1 (CloudQueueMessage) is received with visibility timeout set to 30 seconds.
  2. processing is taking much longer than 30 seconds
    1. while processing of msg1 is happening, msg1 becomes visible on the queue
    2. another competing consumer received the message as msg2
  3. msg1 is attempted to be deleted using CloudQueue.DeleteMessageAsync(msg1). 💥

Exception is thrown The remote server returned an error: (404) Not Found.

Scenario 2

  1. msg1 (CloudQueueMessage) is received with visibility timeout set to 30 seconds.
  2. processing takes 40 seconds
  3. msg1 is kept around and later deleted using CloudQueue.DeleteMessageAsync(msg1).

Message is deleted.

The question

Should the second scenario throw an exception? In the world of the competing consumers it sounds wrong that one can delete a message with an expired PopReceipt.

Side note: This is also very inconsistent with ASB, where once message lock is expired, no operations can happen on the message.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
SeanFeldmancommented, Jun 13, 2016

Raised UserVoice issue here

Please vote there as @mirobers has indicated. This is a storage queue server-side service issue.

0reactions
miroberscommented, Jun 13, 2016

Please do use the feedback link above to register this request so others can vote on it as well. I’m closing the issue here as it doesn’t relate to the client; we can track the request in the feedback forum instead. Thanks for your input!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Queue throwing Exception on DeleteMessage
I'm working on an Azure based project for some research and have been running into some issues when deleting messages from a CloudQueue...
Read more >
CloudQueue Class (Microsoft.Azure.Storage.Queue)
Begins an asynchronous operation to get a single message from the queue, and specifies how long the message should be reserved before it...
Read more >
CloudQueue.DeleteMessageAsync, Microsoft. ...
Queue CloudQueue. ... DeleteMessageAsync extracted from open source projects. ... De-queue the next message"); CloudQueueMessage message = await queue.
Read more >
Azure Queue - Services Bus and Storage Bus
See how to create queue in azure portal, add message in it, queue and dequeue ... any messages that have not been deleted...
Read more >
com.microsoft.azure.storage.queue.CloudQueueMessage ...
Sets the content of the message as a byte array. setNextVisibleTime. Sets the time for the message to become visible in the queue....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found