创建新的QueueTrigger
Azure 函数时,我想将string
输入切换为CloudQueueMessage
.
我已将签名更改为:
public async static Task Run([QueueTrigger("%queue-name%", Connection = "AzureStorageConnection")]CloudQueueMessage myQueueItem, TraceWriter log)
我收到以下错误:
8/15/17 12:16:07 AM] Function started (Id=a137d868-1256-4a67-a225-8a95fb0e31fb)
[8/15/17 12:16:07 AM] Executing 'TokenRefresh' (Reason='New queue message detected on 'refreshtoken'.', Id=a137d868-1256-4a67-a225-8a95fb0e31fb)
[8/15/17 12:16:07 AM] A ScriptHost error has occurred
[8/15/17 12:16:07 AM] Exception while executing function: TokenRefresh. Microsoft.Azure.WebJobs.Host: Exception binding parameter 'myQueueItem'. mscorlib: String reference not set to an instance of a String.
[8/15/17 12:16:07 AM] Parameter name: s.
函数应用程序正确弹出项目,然后因为它抛出快速异常,该队列中的所有项目都进入毒队列。我正在使用最新的函数 sdk 和 windows azure sdk nuget 包。