简体   繁体   English

使用Mule Requester配置VM队列

[英]VM queue configuration with mule requester

I am trying to read data from VM queue using Mule requester. 我正在尝试使用Mule请求程序从VM队列中读取数据。

What should I give in the Queue Path for VM queue? 我应该在VM队列的队列路径中给出什么?

There are a number of examples available for this type of configuration available across various forums and Github . 在各种论坛和Github上都有许多针对这种类型配置的示例。 One such example is available in the MuleSoft Support Knowledge Base . MuleSoft支持知识库中提供了一个这样的示例。 I have additionally provided an Example below: 我还在下面提供了一个示例:

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:vm="http://www.mulesoft.org/schema/mule/vm" xmlns:mulerequester="http://www.mulesoft.org/schema/mule/mulerequester" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
    xmlns:spring="http://www.springframework.org/schema/beans" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/mulerequester http://www.mulesoft.org/schema/mule/mulerequester/current/mule-mulerequester.xsd
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd">
    <flow name="mule-requester-demo-vmFlow">
        <poll doc:name="Poll">
            <set-payload value="#[message.id]" doc:name="Set Payload"/>
        </poll>
        <vm:outbound-endpoint exchange-pattern="one-way" path="my.data.queue" doc:name="VM"/>
    </flow>
    <flow name="mule-requester-demo-vmFlow1">
        <poll doc:name="Poll">
            <fixed-frequency-scheduler frequency="5000"/>
            <logger message="&quot;Getting Messages&quot;" level="INFO" doc:name="Logger"/>
        </poll>
        <mulerequester:request-collection resource="vm://my.data.queue" doc:name="Mule Requester"/>
        <foreach doc:name="For Each">
            <logger message="#[payload]" level="INFO" doc:name="Logger"/>
        </foreach>
    </flow>
</mule>

You can play with the poll frequencies, and the settings on the Mule Requester to return a collection (Request-Collection) or one message in order to get the idea of the module. 您可以使用轮询频率和Mule Requester上的设置来返回一个集合(Request-Collection)或一条消息,以了解该模块的概念。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM