一个不错的MULE主文件

[size=xx-small]mule & seda 的使用每分钟处理5000单,发帖纪念 .[/size]
<mule xmlns="http://www.mulesource.org/schema/mule/core/2.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jdbc="http://www.mulesource.org/schema/mule/jdbc/2.2" xmlns:xm="http://www.mulesource.org/schema/mule/xml/2.2"
xmlns:stdio="http://www.mulesource.org/schema/mule/stdio/2.2" xmlns:vm="http://www.mulesource.org/schema/mule/vm/2.2"
xmlns:cxf="http://www.mulesource.org/schema/mule/cxf/2.2"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.mulesource.org/schema/mule/core/2.2 http://www.mulesource.org/schema/mule/core/2.2/mule.xsd
http://www.mulesource.org/schema/mule/jdbc/2.2 http://www.mulesource.org/schema/mule/jdbc/2.2/mule-jdbc.xsd
http://www.mulesource.org/schema/mule/xml/2.2 http://www.mulesource.org/schema/mule/xml/2.2/mule-xml.xsd
http://www.mulesource.org/schema/mule/vm/2.2 http://www.mulesource.org/schema/mule/vm/2.2/mule-vm.xsd
http://www.mulesource.org/schema/mule/cxf/2.2 http://www.mulesource.org/schema/mule/cxf/2.2/mule-cxf.xsd
http://www.mulesource.org/schema/mule/stdio/2.2 http://www.mulesource.org/schema/mule/stdio/2.2/mule-stdio.xsd">

<context:property-placeholder location="classpath:conf/webserviceClientUrl.properties" />
<stdio:connector name="SystemStreamConnectorActive"
promptMessageCode="3" messageDelayTime="1000" />

<spring:beans>
<spring:import resource="classpath:conf/applicationContext.xml" />
</spring:beans>

<configuration>
<default-dispatcher-threading-profile
maxThreadsActive="50" maxThreadsIdle="25" threadWaitTimeout="1000" threadTTL="60000" />
<default-receiver-threading-profile
maxThreadsActive="50" maxThreadsIdle="25" threadWaitTimeout="1000" threadTTL="60000" />
<default-service-threading-profile
maxThreadsActive="50" maxThreadsIdle="25" threadWaitTimeout="1000" threadTTL="60000" />
</configuration>

<jdbc:connector name="jdbcConnectorActive" pollingFrequency="1200" dataSource-ref="dataSource">

<!-- 激活 -->
<jdbc:query key="orderQry"
value="select /*+index(c IDX_VSOP_CUST_ORDER_STATUS)*/ c.cust_order_id
from customer_order c
where exists (select /*+index(b IDX_ORDER_ITEM_STATUS)*/ b.cust_order_id
from order_item b
where b.order_item_cd = 'T20'
and b.status = '1501'
and b.cust_order_id = c.cust_order_id)
and c.status = '040'
and rownum between 0 and 100" />
<jdbc:query key="orderQry.ack"
value="update CUSTOMER_ORDER set STATUS='110' where CUST_ORDER_ID = #[map-payload:CUST_ORDER_ID] " />

<!-- 竣工 -->
<jdbc:query key="orderCompletionQry"
value="select a.cust_order_id from customer_order a where a.status = '120' and rownum between 0 and 100" />
<jdbc:query key="orderCompletionQry.ack"
value="update CUSTOMER_ORDER set STATUS='899' where CUST_ORDER_ID = #[map-payload:CUST_ORDER_ID] " />

<!-- 用户状态同步下发 -->
<jdbc:query key="userInfoSynQry"
value="select a.user_info_syn_id,
a.system_id,
a.action_type,
a.prod_spec_code,
a.product_no,
a.old_product_no,
a.user_state,
a.user_pay_type,
a.state
from user_info_syn a where a.state = '100'
and rownum between 0 and 100" />
<jdbc:query key="userInfoSynQry.ack"
value="update user_info_syn t set t.state = '200' where t.user_info_syn_id = #[map-payload:user_info_syn_id] " />

<!-- 服开回单 -->
<jdbc:query key="pfOrderQry"
value="SELECT T.WORK_ORDER_ID workOrderId,
T.CUST_ORDER_ID custOrderId,
T.STATE state,
T.ADD_TIME addTime,
T.REMARK remark,
T.ORDER_STATE orderState
FROM RETURN_WORK_ORDER T
WHERE T.STATE='0' and rownum between 0 and 100" />
<jdbc:query key="pfOrderQry.ack"
value="update RETURN_WORK_ORDER set STATE='9' where CUST_ORDER_ID = #[map-payload:custOrderId] "/>
</jdbc:connector>

<endpoint name="CustomerOrderItemRequests" address="vm://customerOrderitem.requests" />
<vm:connector name="vmConnector" queueEvents="true" />

<model name="jdbcInboundActionModel">
<!-- 集团改造 -->
<!-- 激活流程 start -->
<service name="jdbcService">
<inbound>
<jdbc:inbound-endpoint queryKey="orderQry" />
</inbound>
<!-- 使用对象池技术,在系统启动时就会先创建一批对象(本配置为50个)放在对象池里,等发起调用时,系统不会创建新的对象,because the component will reused -->
<pooled-component class="com.tydic.mule.component.OrderProcessComponent">
<pooling-profile exhaustedAction="WHEN_EXHAUSTED_WAIT" initialisationPolicy="INITIALISE_ALL"
maxActive="100" maxIdle="200" maxWait="300" />
</pooled-component>
<outbound>
<pass-through-router>
<vm:outbound-endpoint address="vm://orders" />
</pass-through-router>
</outbound>
</service>

<service name="creatXMLService">
<inbound>
<vm:inbound-endpoint address="vm://orders" />
</inbound>
<!-- 使用对象池技术,在系统启动时就会先创建一批对象(本配置为50个)放在对象池里,等发起调用时,系统不会创建新的对象,because the component will reused -->
<pooled-component class="com.tydic.mule.component.ActiveXMLBuilderComponent">
<pooling-profile exhaustedAction="WHEN_EXHAUSTED_WAIT" initialisationPolicy="INITIALISE_ALL"
maxActive="600" maxIdle="700" maxWait="800" />
</pooled-component>
<outbound>
<pass-through-router>
<vm:outbound-endpoint address="vm://activeXML" />
</pass-through-router>
</outbound>
<threading-profile maxThreadsActive="300" maxThreadsIdle="200" threadWaitTimeout="1000" threadTTL="60000" poolExhaustedAction="RUN"></threading-profile>
</service>

<service name="sendXMLService">
<inbound>
<vm:inbound-endpoint address="vm://activeXML" />
</inbound>
<!-- 使用对象池技术,在系统启动时就会先创建一批对象(本配置为50个)放在对象池里,等发起调用时,系统不会创建新的对象,because the component will reused -->
<pooled-component class="com.tydic.mule.component.ActiveXMLSendComponent">
<pooling-profile exhaustedAction="WHEN_EXHAUSTED_WAIT" initialisationPolicy="INITIALISE_ALL"
maxActive="600" maxIdle="700" maxWait="800" />
</pooled-component>
<threading-profile maxThreadsActive="300" maxThreadsIdle="200" threadWaitTimeout="1000" threadTTL="60000"></threading-profile>
</service>
<!-- 激活流程 end -->

<!-- 竣工流程 start -->
<service name="jdbcCompletionService">
<inbound>
<jdbc:inbound-endpoint queryKey="orderCompletionQry" />
</inbound>
<!-- 使用对象池技术,在系统启动时就会先创建一批对象(本配置为50个)放在对象池里,等发起调用时,系统不会创建新的对象,because the component will reused -->
<pooled-component class="com.tydic.mule.component.OrderCompletionComponent">
<pooling-profile exhaustedAction="WHEN_EXHAUSTED_WAIT" initialisationPolicy="INITIALISE_ALL"
maxActive="100" maxIdle="200" maxWait="300" />
</pooled-component>
</service>
<!-- 竣工流程 end -->


<!-- 用户状态同步下发 -->
<service name="jdbcUserInfoSynService">
<inbound>
<jdbc:inbound-endpoint queryKey="userInfoSynQry" />
</inbound>
<!-- 使用对象池技术,在系统启动时就会先创建一批对象(本配置为50个)放在对象池里,等发起调用时,系统不会创建新的对象,because the component will reused -->
<pooled-component class="com.tydic.mule.component.UserInfoSynXMLBuilderComponent">
<pooling-profile exhaustedAction="WHEN_EXHAUSTED_WAIT" initialisationPolicy="INITIALISE_ALL"
maxActive="600" maxIdle="700" maxWait="800" />
</pooled-component>
<outbound>
<pass-through-router>
<vm:outbound-endpoint address="vm://userInfoSynXML" />
</pass-through-router>
</outbound>
<threading-profile maxThreadsActive="200" maxThreadsIdle="100" threadWaitTimeout="1000" threadTTL="60000" poolExhaustedAction="RUN"></threading-profile>
</service>

<service name="userInfoSynSendXMLService">
<inbound>
<vm:inbound-endpoint address="vm://userInfoSynXML" />
</inbound>
<!-- 使用对象池技术,在系统启动时就会先创建一批对象(本配置为50个)放在对象池里,等发起调用时,系统不会创建新的对象,because the component will reused -->
<pooled-component class="com.tydic.mule.component.UserInfoSynXMLSendComponent">
<pooling-profile exhaustedAction="WHEN_EXHAUSTED_WAIT" initialisationPolicy="INITIALISE_ALL"
maxActive="200" maxIdle="300" maxWait="400" />
</pooled-component>
</service>
<!-- 用户状态同步下发 end-->


<!-- 服开回单服务 -->
<service name="jdbcInboundPFReturnService">
<inbound>
<jdbc:inbound-endpoint queryKey="pfOrderQry" />
</inbound>
<pooled-component class="com.tydic.mule.component.PFReturnXMLBuilderComponent">
<pooling-profile exhaustedAction="WHEN_EXHAUSTED_WAIT" initialisationPolicy="INITIALISE_ALL"
maxActive="600" maxIdle="700" maxWait="800" />
</pooled-component>
<outbound>
<pass-through-router>
<vm:outbound-endpoint address="vm://pfReturnXMLOrders" />
</pass-through-router>
</outbound>
<threading-profile maxThreadsActive="150" maxThreadsIdle="75" threadWaitTimeout="1000" threadTTL="60000" poolExhaustedAction="RUN"></threading-profile>
</service>

<service name="pfReturnSendXMLService">
<inbound>
<vm:inbound-endpoint address="vm://pfReturnXMLOrders" />
</inbound>
<pooled-component class="com.tydic.mule.component.PFReturnXMLSendComponent">
<pooling-profile exhaustedAction="WHEN_EXHAUSTED_WAIT" initialisationPolicy="INITIALISE_ALL"
maxActive="600" maxIdle="700" maxWait="800" />
</pooled-component>
<threading-profile maxThreadsActive="200" maxThreadsIdle="100" threadWaitTimeout="1000" threadTTL="60000" poolExhaustedAction="RUN"></threading-profile>
</service>
<!-- 服开回单服务 end -->

<!--
<service name="jdbcInboundActionService">
<inbound>
<jdbc:inbound-endpoint queryKey="orderQry" />
</inbound>
<component class="com.muleinaction.MuleDataServiceComponent" />
<outbound>
<pass-through-router>
<vm:outbound-endpoint address="vm://orders" />
</pass-through-router>
</outbound>
</service>
<service name="ThreeWebService">
<inbound>
<vm:inbound-endpoint address="vm://orders" />
</inbound>
<component class="com.muleinaction.ThreeWebServiceComponent" />
</service>
<service name="ClientWebService">
<inbound>
<vm:inbound-endpoint ref="CustomerOrderItemRequests" />
</inbound>
<component class="com.muleinaction.ClientCXFWebServiceComponent">
</component>
</service>
-->
</model>
</mule>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值