Skip to content

Conversation

@davidmrdavid
Copy link
Collaborator

@davidmrdavid davidmrdavid commented Apr 17, 2024

In order to update messages on Azure Storage, we need to provide an up-to-date "popReceipt" to the Azure Storage SDK. Otherwise, the request will fail with "404"-type errors. After every message update operation, the popReceipt for a message is updated.

From recent reports, we learned that in the new Azure Storage SDK, the popReceipt of an queueMessage object is not automatically updated in-place when the update API is called. Instead, the update API now returns an updateReceipt object containing the new popRecepit, and leaves the popReceipt in the queueMessage object intact, making it stale.
 
This suggests that we cannot simply access queueMessage.popReceipt to obtain the latest receipt, instead we'll need to maintain an extra mapping between messageIds and their latest popReceipts. This PR implements a rather naive mapping, but further refinement may be needed.

work in progress

@davidmrdavid
Copy link
Collaborator Author

would be great to add some kind of test to make sure the popReceipt is updated in future releases. This is an invariant we'd expect no matter what.

@davidmrdavid
Copy link
Collaborator Author

davidmrdavid commented Apr 18, 2024

note: let's refactor as per this PR (#1066 so that we actually update the popReceipt in the SDK queue object. Unclear yet if the PR should be merged as-is, or incorporated here. Needs some thinking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant