我有一个服务总线主题触发函数,只要将某些数据推送到主题,该函数就会被触发。
函数看起来像这样:
[FunctionName("funcGetServiceBusEntities")]
public async Task Run([ServiceBusTrigger("sbtopic", "sbsub", Connection = "ServiceBusConnectionString")]Message message, MessageReceiver messageReceiver, [DurableClient] IDurableOrchestrationClient starter, ILogger log)
{
// perform processing on the data
//...
//...
// Complete since we don't want to process the message again
await messageReceiver.CompleteAsync(message.SystemProperties.LockToken);
//...
}
我不确定为什么会出现此错误:
Microsoft.Azure.ServiceBus: The lock supplied is invalid. Either the lock expired, or the message has already been removed from the queue. Reference:ab88d42f-5fed-4392-983a-921cc6eab776, TrackingId:7664c851-9f29-4b4f-a334-4038e0921810_B11, SystemTracker:sb-dev:Topic:sbtopic|sbsub, Timestamp:2020-03-31T12:09:32.
CompleteAsync
的实现有错吗?
最佳答案
关于c# - Microsoft.Azure.ServiceBus : The lock supplied is invalid. 锁定已过期,或者消息已从队列中删除,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60950664/