【问题标题】:how to read messages with the session id from session-based queue using Azure Logic App如何使用 Azure Logic App 从基于会话的队列中读取具有会话 ID 的消息
【发布时间】:2020-12-28 20:29:36
【问题描述】:

我有 Azure Logic App,它使用 当一条或多条消息到达队列时(peek-lock) 连接器处理来自基于服务总线会话的队列的消息。

我已将 20 条具有相同会话 ID 的消息发送到服务总线队列。

但它不是一次读取所有消息。它正在一个一个地阅读。

我已经关注了这些链接

https://docs.microsoft.com/en-us/connectors/servicebus/#when-one-or-more-messages-arrive-in-a-queue-(peek-lock)

https://docs.microsoft.com/en-us/connectors/servicebus/#when-a-message-is-received-in-a-queue-(peek-lock)

谁能建议我如何使用 Azure Logic App 从基于会话的队列中读取带有会话 ID 的消息。

【问题讨论】:

    标签: azure azureservicebus azure-logic-apps


    【解决方案1】:

    解决方案:

    请点击When one or more messages arrive in a queue (peek-lock)触发器右上角的···,然后点击setting

    关闭Split on

    这样可以同时读取sessionId相同的消息:

    说明:

    启用Split On 将为每条消息创建一个工作流实例。

    【讨论】:

    • 一个问题,我们是需要在foreach内部还是在foreach外部关闭会话。如果在foreach之外,那么如何使用sessionid?
    • 嗨,@Pradeep。如果有多条消息,则需要关闭for each 中的会话。我测试了它。如果在外面选择Close a session in a queue动作,会自动添加for each
    • 是的,但是基本上我们需要在阅读完所有消息后关闭会话
    • 目前我在 foreach 循环中使用变量来获取会话 ID,然后在关闭队列中的会话时在 foreach 循环之外使用该自定义变量。
    猜你喜欢
    • 2013-11-11
    • 1970-01-01
    • 1970-01-01
    • 2017-03-03
    • 2011-08-26
    • 2011-10-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多