当 Orchestrator 从 EventHub 触发器调用时,如何获取 Webhook 来查询实例状态。

huangapple go评论42阅读模式
英文:

When Orchestrator is called from an EventHub trigger , how to get webhook to query the instance statuses

问题

我试图在事件中心触发器上调用可持续编排器。我可以这样做。
我是否仍然可以获得用于查询可持续编排器实例状态的Webhook?
还是我需要介绍一个HTTP触发器以便获得Webhook端点。

英文:

I am trying to call durable orchestrator on Event Hub trigger. I am able to do so.
Do I still get a webhook to query the statuses of the durable orchestrator instances?
Or I need to introduce a http trigger in between in order to get the webhook endpoint.

答案1

得分: 0

如果您正在使用事件网格触发器启动编排,那么响应将被发送到事件网格,所以我认为您无法捕获它。

  • 如果您的事件具有某些独特的内容,您可以将其用作InstanceId
  • 然后,您可以使用接受实例ID的StartNewAsync的重载来启动可维护函数
  • 最后,您可以创建一个HTTP触发器,接受实例ID,并使用GetStatusAsync获取状态,或使用CreateCheckStatusResponse生成状态URL

此外,状态URL可以手动构建,状态URL中的关键是存储帐户密钥。

英文:

If you are using Event Grid Trigger to Start Orchestration then the response will be sent to Event Grid, so I do not think you can capture it.

  • If your Event has something unique that you can use as a InstanceId
  • Then, you can start Durable Function using an overload of StartNewAsync that accepts instance ID
  • Lastly, you can create a HTTP Trigger that accepts Instance ID and use GetStatusAsync to get status or use CreateCheckStatusResponse to generate Status URLs

Also, the status URL can be built manually, the key in status URL is Storage Account Key.

huangapple
  • 本文由 发表于 2023年3月7日 00:29:23
  • 转载请务必保留本文链接:https://go.coder-hub.com/75653377.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定