我有一個JDBC連接器的入站端點獲取正確的結果在我的數據庫設置。
我注意到每一行都是作爲新消息返回的。
我的問題:我怎樣都行合併爲一個消息?聚合器是唯一的選擇嗎?
用騾子版本3.3.1 CE
騾子JDBC結合的結果集
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:jersey="http://www.mulesoft.org/schema/mule/jersey"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" xmlns:jdbc="http://www.mulesoft.org/schema/mule/jdbc"
xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:mongo="http://www.mulesoft.org/schema/mule/mongo"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/jdbc http://www.mulesoft.org/schema/mule/jdbc/current/mule-jdbc.xsd
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/jersey http://www.mulesoft.org/schema/mule/jersey/current/mule-jersey.xsd " version="CE-3.3.1">
<context:property-placeholder location="configuration.properties" />
<spring:beans>
<spring:bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<spring:property name="driverClassName" value="mydriver"/>
<spring:property name="url" value="${jdbc.url}"/>
<spring:property name="username" value="${jdbc.user}"/>
<spring:property name="password" value="${jdbc.password}"/>
</spring:bean>
</spring:beans>
<jdbc:connector name="AS400" dataSource-ref="dataSource"
validateConnections="true"
queryTimeout="-1"
pollingFrequency="5000"
transactionPerMessage="false"
doc:name="Database">
<jdbc:query key="selectNums" value="select someColumns from someTable"/>
</jdbc:connector>
<flow name="databaseFlow" doc:name="databaseFlow" processingStrategy="synchronous">
<jdbc:inbound-endpoint
queryKey="selectNums" queryTimeout="-1" connector-ref="AS400"
doc:name="select-record" pollingFrequency="45000">
</jdbc:inbound-endpoint>
<logger message="msg to send: #[map-payload:col1]" level="INFO" doc:name="Logger" />
<logger message="phone number: #[map-payload:col2]" level="INFO" doc:name="Logger" />
<custom-transformer class="myTransformer" doc:name="Java"/>
</flow>
提供您的騾子配置文件。 – user1760178