Mule and QuickFIX/J integration
(configuration
and code NOT be verified)
一.
Requirement,
Installation.
TODO
二.
Configuration.
1.
Declare the namespace, the
following example just contains:mule, spring ,vm, and fix
<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:vm="http://www.mulesource.org/schema/mule/vm/2.2"
xmlns:fix="http://www.mulesource.org/schema/mule/fix/2.2"
xsi:schemaLocation="http://www.mulesource.org/schema/mule/core/2.2 http://www.mulesource.org/schema/mule/core/2.2/mule.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.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/fix/2.2 http://www.mulesource.org/schema/mule/fix/2.2/mule-fix.xsd">
2.
Defined the fix connector and
endpoint
a)
Connector
<fix:connector name="fixConnector" config="./fix/fix-setting.cfg"/>
b)
Endpoing
<fix:endpoint name="zhFixIncoming" sessionID="FIX.4.4:XMLHK-XMLZH"/>
<fix:endpoint name="hkExFixIncoming" sessionID="FIX.4.4:XMLHK-HKEx"/>
Actually, the sessionID would be look like
as FIX.4.4:XMLHK->XMLZH
3.
Defined the message
transformer(Optional)
4.
Defined the fix session setting
Config the fix session setting, more info can refer to http://www.quickfixj.org/quickfixj/usermanual/usage/configuration.html
[default]
FileStorePath=log/data
FileLogPath=log/log
ReconnectInterval=5
HeartBtInt=30
LogonTimeout=60
PersistMessages=Y
[session]
BeginString=FIX.4.4
ConnectionType=acceptor
SenderCompID=XMLHK
TargetCompID=XMLZH
StartTime=00:00:00
EndTime=00:00:00
SocketAcceptAddress=192.168.1.1
SocketAccetpPort=3030
TimeZone=Asia/Hong_Kong
[session]
BeginString=FIX.4.4
ConnectionType=initiator
SenderCompID=XMLHK
TargetCompID=HKEx
StartTime=00:00:00
EndTime=00:00:00
SocketConnectHost=192.168.1.2
SocketConnectPort=3031
TimeZone=Asia/Hong_Kong
ResetOnLogon=Y
Note: the first session can be regard to a
sell side and the other is a buy side.
5.
The mule model and service.
<model>
<service name="zhFixIncomingService">
<inbound>
<inbound-endpoint ref="zhFixIncoming"/>
</inbound>
<component>
<spring-object bean="zhFixIncomingMessageService"
</component>
<outbound>
<pass-through-router>
<outbound-endpoint ref="hkExFixIncoming"/>
</pass-through-router>
</outbound>
</service>
<service name="hkExFixIncomingService">
<inbound>
<inbound-endpoint ref="hkExFixIncoming"/>
</inbound>
<component>
<spring-object bean="hkExFixIncomingMessageService"
</component>
<outbound>
<pass-through-router>
<outbound-endpoint ref="zhFixIncoming" />
</pass-through-router>
</outbound>
</service>
</model>
6.
Spring bean configuration
<spring:bean id="zhFixIncomingMessageService" class="com…ZhFixIncomingMessageService">
</spring:bean>
<spring:bean id="hkExFixIncomingMessageService" class="com…hkExFixIncomingMessageService">
</spring:bean>
7.
Java code:
a)
zhFixIncomingMessageService
public class ZhFixIncomingMessageService implements Callable{
public Object onCall(MuleEventContext context) throws MuleException {
TODO all fix message from first session will be processed through this callback method.
}
}
b)
hkExFixIncomingSerivce
public class HkFixIncomingMessageService implements Callable{
public Object onCall(MuleEventContext context) throws MuleException {
TODO all fix message from second session will be processed through this callback method.
}
}
8.
TODO
三.
分享到:
相关推荐
你可以从官方下载页面(http://docs.codehaus.org/display/MULE/Download)下载最新版本,或者在Eclipse中添加更新站点(http://dist.codehaus.org/mule/muleide/updates/)来安装Mule插件。 5. **Mule的使用** - ...
${catalina.home}/mule-libs/user/*.jar,${catalina.home}/mule-libs/mule/*.jar,${catalina.home}/mule-libs/opt/*.jar ``` 这使得Tomcat能够加载Mule所需的库。 部署Mule应用: 1. 将你的Mule应用打包成WAR...
/opt/mule/logs vromero/mule值得注意的挂载点挂载点描述/ opt / mule / apps Mule应用程序部署目录/ opt / m子/域Mule Domains部署目录/ opt / m子/ conf 配置目录/ opt / m子/日志日志目录裸露的端口港口描述8081 ...
Mule in Action, Second Edition is a totally-revised guide covering Mule 3 fundamentals and best practices. It starts with a quick ESB overview and then dives into rich examples covering core concepts ...
http://www.mulesource.org/schema/mule/vm/2.0 http://www.mulesource.org/schem The hello sample application has two components: 1. The Greeter component that adds a greeting to the event it ...
${catalina.home}/mule-libs/user/*.jar,${catalina.home}/mule-libs/mule/*.jar,${catalina.home}/mule-libs/opt/*.jar ``` 6. 添加`tomcat-juli-adapters.jar`:将`tomcat-juli-adapters.jar`文件从附件中复制...
添加两个`context-param`标签,指定Mule的配置文件(例如`mule-config.xml`)和Log4J的日志配置文件(例如`log4j.properties`)的位置。 ```xml ... <param-name>org.mule.config</param-name> <param-value>...
It starts with a quick overview of ESB technologyand a bit of Mule history-including the key changes between Mule 1.x andMule 2. Readers learn to configure Mule and then get straight to the goodstuff...
- **新的命名空间**:Mule 2.0引入了核心命名空间和其他模块或传输的命名空间,例如`<mule xmlns="http://www.mulesource.org/schema/mule/core/2.0">`。这种做法增强了配置文件的可读性和可扩展性。 ##### 2. 连接...
svn checkout http://svn.codehaus.org/mule/branches/mule-3.x 本次下载的Mule源码版本号为214063。 编译源代码 在控制台上进入源码所在目录,使用以下命令下载源码依赖包: mvn -DskipTests install 成功后...
根据提供的文档信息,“mule-1.4.4-getting-started.pdf”是关于Mule ESB(Enterprise Service Bus)1.4.4版本的入门指南。这份文档由tcarlson于2008年4月16日创建,并在同一天进行了最后的修改。以下是从文档的标题...
通常,Mule ESB使用log4j或Logback作为日志框架,`log4j.properties`文件即为该框架的配置文件,它允许我们定制日志级别、输出目的地和格式。 `openejb.conf`和`openejb.properties`涉及到OpenEJB,这是一个开源的...
在IT行业中,Mule ESB(企业服务总线)是一种流行的集成平台,它允许开发者连接、管理和集成不同的系统、应用程序和服务。在这个特定的实例中,我们关注的是如何使用Mule ESB并行调用多个Web服务接口。这个主题对于...
Mule ESB基于Java,但它不是传统的Java EE应用服务器,而是采用了更轻量级的Java运行时环境,如Java Management Extensions (JMX) 和Java Naming and Directory Interface (JNDI)。这种设计使得Mule可以在较低的硬件...
"Mule开发环境搭建和部署" Mule是当前流行的企业服务总线(Enterprise Service Bus, ESB),它提供了一个灵活、可扩展、高性能的集成平台。构建Mule开发环境是Mule应用程序的基础,以下将对Mule开发环境的搭建和...
Mule ESB 是一个轻量级的基于java的企业服务总线和集成平台, 使得开发人员可以快速,简单的连接多个应用, 使得它们可以交换数据。 Mule ESB 容易集成现有异构系统,包括:JMS, Web Services, JDBC, HTTP, 等. ESB...
尽管Mule并不依赖Java Business Integration (JBI)标准,但它通过JBI绑定支持与JBI容器(如ServiceMix)的交互,这意味着Mule组件可以与其他遵循JBI标准的组件进行通信。然而,Mule的内部API并未基于JBI标准,而是...
作为轻量级的消息框架和整合平台,Mule ESB遵循Enterprise Integration Patterns(EIP)的设计原则,旨在提供高效、灵活且易于开发的解决方案。自2005年发布1.0版本以来,Mule ESB逐渐获得了广泛的关注,被众多大型...