gpt4 book ai didi

node.js - Azure函数使用nodejs获取服务总线brokeredMessage

转载 作者:太空宇宙 更新时间:2023-11-03 23:03:09 25 4
gpt4 key购买 nike

有没有办法从 javascript azure 函数检索服务总线代理的消息。此时,只有一个包含 invokingId 的上下文,而不是包含所有属性(例如 brokeredProperties 或 customPropeties)。

谢谢

最佳答案

现在,所有服务总线自定义属性都可在 context.bindingData.properties 对象中使用。

就我而言:

properties: 
{
type: 'sometype', // <- this is the property I have set manually in IoT Device-to-Cloud message
'iothub-connection-device-id': 'mydeviceid',
'iothub-connection-auth-method': '{"scope":"somescope","type":"sometype","issuer":"external","acceptingIpFilterRule":null}',
'iothub-connection-auth-generation-id': 'someid' // <- These are added by IoT Hub
}

关于node.js - Azure函数使用nodejs获取服务总线brokeredMessage,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42385995/

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