使用功能应用将消息从Azure Service Bus中的APIM发送到API
有没有办法发送在服务总线队列上接收到的有效载荷,使用功能应用程序将其发送到API中的API?我计划在ServiceBustrigger函数上执行此操作。我已经在Queuemessage上有消息/有效载荷,我只需要直接调用API并将Queuemessage的值发送到API
public static void Run([ServiceBusTrigger("sbq-messagequery", Connection = "ServiceBusConnection")]
QueueMessage queueItem, ILogger log)
{
dynamic data = JsonConvert.SerializeObject(queueItem);
log.LogInformation($"C# ServiceBus queue trigger function processed message: {data}");
log.LogWarning($"Id = {queueItem.Payload}");
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须在触发方法中进行httprequest。
请找到建议在Azure函数中使用httpclient
在您的情况下,这可能是邮政请求:
You have to do an HttpRequest in your Trigger method.
Please find advice for using the HttpClient in Azure Functions in the documentation
In your case it might be a POST request: