如何从隔离的Service Bus触发Azure函数中访问队列名称?

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

How can I access Queue Name from with in Isolated Service Bus Trigger Azure Function middleware?

问题

我正在为Service Bus Trigger Isolated Azure Function编写自定义中间件,我如何从中间件内部访问消息的源队列名称?

我尝试在函数上下文绑定数据属性中查找它,但未找到。

英文:

I'm writing a custom middleware for Service Bus Trigger Isolated Azure Function and how can I access source queue name of the message from with in my middleware?

I tried to look for it in the function context binding data properties but couldn't find it.

答案1

得分: 1

我们在Twitter上进行了一些信息交流。这里的要求不仅仅是队列名称,而是实现目前使用孤立型SDK无法实现的功能 - 自定义重试。我的建议是要么等待该功能引入并且与进程内SDK具有相同功能,要么将您的函数移回进程内,其中MessageActions可用于控制消息处理。好消息是,Azure服务总线的Functions团队正在积极开发SDK类型的支持。这之后,希望能够允许最终用户对传入消息进行处理(放弃、完成、推迟或死信)。

英文:

We had some information exchange on Twitter. The ask here is not so much for the queue name but to achieve a functionality currently not possible with Isolated SDK - custom retries. My suggestion is to either hold off until the feature is introduced and there's parity with the In-Process SDK or move your function back to in-proc where MessageActions are available to control message dispositioning. The good news is the Functions team is actively working on the SDK-type support for Azure Service Bus. That will hopefully be followed by allowing end-user code dispositioning of the incoming message (abandon, complete, defer, or dead-letter).

huangapple
  • 本文由 发表于 2023年2月16日 18:31:21
  • 转载请务必保留本文链接:https://go.coder-hub.com/75470961.html
匿名

发表评论

匿名网友

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

确定