gpt4 book ai didi

azure - 将类型化对象添加到 Azure 中的 MessageQueue

转载 作者:行者123 更新时间:2023-12-03 04:39:24 25 4
gpt4 key购买 nike

我想先将一个类添加到 MessageQueue 的 MessageContent,然后再将其添加到 QueueStorage。

示例

class udpates
{
public int userId {get; set; }
public Datetime UpdateTime {get; set; }
}


queue.addMessage("instance of updates class")

我该怎么做?

谢谢

最佳答案

队列消息可以是字符串或二进制。您可以自己序列化对象,然后将结果排入队列。

就我个人而言,我更喜欢基于字符串的队列消息,因为我可以通过从队列中提取消息并查看它们来轻松调试问题,而无需解码。此外,当队列消息是字符串时,更新队列消息也很容易。

关于azure - 将类型化对象添加到 Azure 中的 MessageQueue,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10920632/

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