gpt4 book ai didi

azure - 将消息安排到 Azure 队列的机制

转载 作者:行者123 更新时间:2023-12-03 05:53:32 26 4
gpt4 key购买 nike

让我们考虑一个设备,它不断地将其事件消息发送到 azure 队列作为 Q1 。对于每条消息,我有 2 个属性,一个是 MessageContent,另一个是我们需要将该 MessageContent 推送到另一个属性的时间队列为 Q2。我的问题是请帮助找到队列之间的间隙(根据时间配置从 Q1 到 Q2 触发消息的机制)。

最佳答案

这就是 BrokeredMessage 类的 Scheduled​Enqueue​Time​Utc 属性的用途。像这样使用它:

var message = new BrokeredMessage(content)
{
Scheduled​Enqueue​Time​Utc = timeToSend
};
queueClient.Send(message);

所以,如果我理解正确的话,Q1 处理器应该从 Q1 读取内容和 timeToSend 并将消息排队到 Q2,如上所示。

Documentation ,注意备注:

Message enquing time does not mean that the message will be sent at the same time. It will get enqueued, but the actual sending time depends on the queue's workload and its state.

关于azure - 将消息安排到 Azure 队列的机制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44698933/

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