gpt4 book ai didi

c# - 无法使用Azure功能将消息发送到服务总线队列

转载 作者:行者123 更新时间:2023-12-03 01:42:37 25 4
gpt4 key购买 nike

我有如下所示的 Azure 功能 -

[FunctionName("Demo")]
public static void Run([ServiceBusTrigger("%Demo-Queue%", Connection = "AzureWebJobsBPGAServiceBus")]string myQueueItem,
[ServiceBus("%Update-Queue%", Connection = "AzureWebJobsBPGAServiceBus")] ICollector<BrokeredMessage> updateMessage,
TraceWriter log)
{
string query = "SELECT Id FROM MyTable";

var data = dbs.GetData(query).GetAwaiter().GetResult();

BrokeredMessage brokeredMessage;
foreach (var item in data)
{
JObject jObject = new JObject(new JProperty("Id", item), new JProperty("MessageId", new Guid(item)));
brokeredMessage = new BrokeredMessage(jObject.ToString());
updateMessage.Add(brokeredMessage);
}
}

But message going in dead letter queue . why ? Message format is also correct.Any clue ?

最佳答案

如果消息被移动到死信队列,原因可能是 one of these 。死信消息中将会添加两个自定义属性,当它被移至死信队列时(DeadLetterReason 和 DeadLetterErrorDescription),请尝试读取这些属性以查找原因。

关于c# - 无法使用Azure功能将消息发送到服务总线队列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51516431/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com