我是 Azure 函数的新手。我想设置一个队列触发函数来消耗队列中的项目。其中队列是与主队列分离的并行队列。
但是当我运行它时,它不断显示:
Executed 'QueueTrigger2' (Failed, Id=33e2634c-1c00-4996-a81a-fec47c088d73, Duration=163ms)
[2022-06-21T18:38:48.866Z] System.Private.CoreLib: Exception while executing function: QueueTrigger2. Microsoft.Azure.WebJobs.Host: Exception binding parameter 'myQueueItem'. System.Private.CoreLib: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.
这是否意味着我的队列中的消息类型不正确?但它是来自主进程队列的并行队列。所以我确信这是正确的。 或者我需要在输入之前进行一些转换?
谢谢。
最佳答案
将消息发布到服务总线队列以供 Azure 函数使用时,必须首先对消息进行 Base64 编码。在这里回答:https://stackoverflow.com/a/65000524/879247
关于c# - 在 Azure 中运行队列触发器函数时出现错误 : The input is not a valid Base-64 string. ..,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72705726/