我有一个服务总线主题触发功能,只要将一些数据推送到该主题,就会触发该功能。
函数看起来像这样:
[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:提供的锁无效。锁已过期,或者消息已从队列中删除。参考:ab88d42f-5fed-4392-983a-921cc6eab776,TrackingId:7664c851-9f29-4b4f-a334-4038e0921810_B11,SystemTracker:sb-dev:主题:sbtopic | sbsub,时间戳:2020-03-31T12:09:32。 >
CompleteAsync
的实现是否错误?