Mule:Polling 在多个 table 数据库连接器上

Mule:Polling on multiple table of a database connector

需要轮询数据库连接器的多个表。当尝试使用复合源

对表应用单独的轮询时
<composite-source>
   <poll>
     <db:select config-ref="databaseConnector"/> <!--select on table 1-->
   </poll>
   <poll>
     <db:select config-ref="databaseConnector"/> <!--select on table 2-->
   </poll>
</composite-source>

获取已在端点 uri 上注册的错误轮询器。我如何使用数据库连接器轮询多个表以获取更新的数据。

您可以尝试以下方式:-

<composite-source>
        <poll frequency="10000" doc:name="Poll">
        <processor-chain > 
         <db:select config-ref="Oracle_Configuration" doc:name="Database">
            <db:parameterized-query><![CDATA[select * from Table1]]></db:parameterized-query>
        </db:select> 
         <logger level="INFO" message="Your Payload from Table1:- ....." doc:name="Logger"/>

        <db:select config-ref="Oracle_Configuration" doc:name="Database">
            <db:parameterized-query><![CDATA[select * from Table2]]></db:parameterized-query>
        </db:select>
         <logger level="INFO" message="Your Payload from Table2:- ...." doc:name="Logger"/>
         </processor-chain>
        </poll>
</composite-source>
         <logger level="INFO" message="The remaining flow " doc:name="Logger"/>

这对我来说很好:)

使用三个流程:

<flow name="poll-table-1">
  <poll frequency="...">...</poll>
  <flow-ref name="table-data-processor" />
</flow>

<flow name="poll-table-2">
  <poll frequency="...">...</poll>
  <flow-ref name="table-data-processor" />
</flow>

<flow name="table-data-processor">
  ...
</flow>