Open
Description
- Package Name: azure-storage-queue
- Package Version: 12.12.0
- Operating System: MacOs/Ubuntu
- Python Version: 3.12
Sometimes My app produces repeating messages for entities in the system that were already processed.
The app filters those messages with an internal logic and than tries to delete the message from the queue if the Job is already done for the given entity.
My logic looks something like this:
MSG_TO = 60 * 10
queue_client: QueueClient = await get_or_create_queue_client(settings.FINALIZE_TRANSCRIPTION_QUEUE_NAME) # noqa
if message := await queue_client.receive_message(visibility_timeout=MSG_TO):
if await should_run_job(message):
await run_job(message)
else:
queue_client.delete_message(message)
When I try to delete the message, I get this error:
Traceback (most recent call last):
File "/app/app/job.py", line 141, in _safe_del_msg
await queue_client.delete_message(msg)
File "/app/.venv/lib/python3.12/site-packages/azure/core/tracing/decorator_async.py", line 119, in wrapper_use_tracer
return await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/azure/storage/queue/aio/_queue_client_async.py", line 981, in delete_message
raise ValueError("pop_receipt must be present")
ValueError: pop_receipt must be present
Now, according to the docs, I should be able to just delete the message, because when I use the receive_message method, it should assign a pop_receipt to it.
yet, it's none and than the message just keeping coming back to the queue, waking up the service and
Metadata
Metadata
Assignees
Labels
This issue points to a problem in the data-plane of the library.Workflow: This issue is responsible by Azure service team.Storage Service (Queues, Blobs, Files)Issues that are reported by GitHub users external to the Azure organization.Workflow: More information is needed from author to address the issue.There has been no recent activity on this issue.The issue doesn't require a change to the product in order to be resolved. Most issues start as that