I am using python langauge to send & receive messages using Azure bus service queue.
I am getting "The lock supplied is invalid.Either the lock expired, or the message has already been removed from the queue" when deleting message from queue using below code.
sbs.delete_queue_message('taskqueue',5,'ef4e2189-bfef-42ac-ba09-7fd20287f6a9') sbs.delete_queue_message('taskqueue','SequenceNumber','LockToken')
from azure.servicebus.control_client import ServiceBusService, Message, Topic, Rule, DEFAULT_RULE_NAME
key_name = '###############' # SharedAccessKeyName from Azure portal
key_value = '####################' # SharedAccessKey from Azure portal
service_namespace = '###########'
sbs = ServiceBusService(service_namespace,shared_access_key_name=key_name,shared_access_key_value=key_value)
msg = sbs.receive_queue_message('taskqueue')
sbs.delete_queue_message('taskqueue',5,'ef4e2189-bfef-42ac-ba09-7fd20287f6a9')
ef4e2189-bfef-42ac-ba09-7fd20287f6a9
) value? – Basiliabasilian