AdroitLogic ProjectX supports FIX message transferring with new FIX connector introducing with ProjectX-Beta1 release.
Configuring the project.xpl
Add the following resources which will be referred project spesific configuration file .xcml
The following is the final .xpml file which will be created while configuration is done through the user interface.
Following is the final .xcml file that will be created after configuring the above
Testing the message flow
FIX connector configuration for the ESB with UltraStudio.
Create a new project with adding the FIX connector to connector list.Configuring the project.xpl
Add the following resources which will be referred project spesific configuration file .xcml
Resource
|
Type
|
Resource class type
|
fileMsgStore
|
org.adroitlogic.x.transport.fix.util.FileMessageStoreFactoryImpl
| |
fileLogFactory
|
org.adroitlogic.x.transport.fix.util.FileLogFactoryImpl
| |
SessionBANZAI1
|
org.adroitlogic.x.transport.fix.FIXSession
| |
senderOtherSettings
|
java.util.Map
| |
EndpointOtherSettings
|
java.util.Map
| |
configuredSessions
|
java.util.List
| |
otherAcceptorSettingss
|
java.util.Map
|
The following is the final .xpml file which will be created while configuration is done through the user interface.
<x:project id="StudioProj2" name="StudioProj2" version="1.0-SNAPSHOT"
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://www.adroitlogic.org/x/x-project"
xsi:schemaLocation="http://www.adroitlogic.org/x/x-project http://schemas.adroitlogic.org/x/x-project-1.0.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd">
<x:description>A sample project that demonstrates the projects concept</x:description>
<x:flows>
<x:flow id="test" file="test.xcml"/>
</x:flows>
<x:resources>
<x:resource id="fileMsgStore">
<bean class="org.adroitlogic.x.transport.fix.util.FileMessageStoreFactoryImpl">
<property name="fileStorePath" value="/tmp/fixTest2"/>
</bean>
</x:resource>
<x:resource id="fileLogFactory">
<bean class="org.adroitlogic.x.transport.fix.util.FileLogFactoryImpl">
<property name="fileLogPath" value="/tmp/fixTest2/log"/>
</bean>
</x:resource>
<x:resource id="SessionBANZAI1">
<bean class="org.adroitlogic.x.transport.fix.FIXSession">
<property name="targetCompId" value="BANZAI"/>
<property name="beginString" value="FIX.4.2"/>
</bean>
</x:resource>
<x:resource id="senderOtherSettings">
<map>
<entry key="LogonTimeout" value="6"/>
</map>
</x:resource>
<x:resource id="EndpointOtherSettings">
<map>
<entry key="DefaultMarketPrice" value="12.30"/>
</map>
</x:resource>
<x:resource id="configuredSessions">
<list>
<ref bean="SessionBANZAI1"/>
</list>
</x:resource>
<x:resource id="otherAcceptorSettingss">
<map>
<entry key="AcceptorTemplate" value="Y"/>
<entry key="UseDataDictionary" value="N"/>
</map>
</x:resource>
</x:resources>
</x:project>
|
Configuring a simple message flow path
This post explains a simple message flow to mediate fix message transaction with a fix-listener to listen to incoming messages over FIX protocol and a fix-sender to send-out the fix messages to outside receivers over fix protocol.
Configuring FIX Ingress connector
IngressConnector is the message entry point for fix messages. You can define the configuration in the ESB fix message acceptor and other fix ingress connector configuration through the tool user interface.
|
Configuring FIX Egress connector
EgressConnector is the message out port of ESB for fix messages. You can define the configuration in the ESB fix message initiator and other fix egress connector configuration through the tool user interface.
|
Following is the final .xcml file that will be created after configuring the above
<beans xmlns="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-4.1.xsd">
<bean id="53ec558f-4f13-596e-6649-d221bcb62ea0" class="org.adroitlogic.x.connector.fix.FIXIngressConnector">
<property name="socketAcceptPort" value="12000"/>
<property name="senderCompID" value="UESB"/>
<property name="heartBeatIntervalSec" value="30"/>
<property name="startTime" value="00:00:00"/>
<property name="endTime" value="23:00:00"/>
<property name="configuredSessions" ref="configuredSessions"/>
<property name="messageStoreFactory" ref="fileMsgStore"/>
<property name="logFactory" ref="fileLogFactory"/>
<property name="otherSettings" ref="otherAcceptorSettingss"/>
<property name="processingElement" ref="323f1384-66c5-3b8f-91f1-0caa4e148b09"/>
</bean>
<bean id="323f1384-66c5-3b8f-91f1-0caa4e148b09" class="org.adroitlogic.x.connector.fix.FIXEgressConnector">
<property name="heartBeatIntervalSec" value="30"/>
<property name="startTime" value="00:00:00"/>
<property name="endTime" value="23:00:00"/>
<property name="reconnectInterval" value="5"/>
<property name="messageStoreFactory" ref="fileMsgStore"/>
<property name="logFactory" ref="fileLogFactory"/>
<property name="otherSettings" ref="senderOtherSettings"/>
<property name="socketConnectHost" value="localhost"/>
<property name="socketConnectPort" value="9879"/>
<property name="beginString" value="FIX.4.2"/>
<property name="senderCompID" value="UESB"/>
<property name="targetCompID" value="EXEC"/>
<property name="endpointConfigurations" ref="EndpointOtherSettings"/>
<property name="responseProcessor" ref="53ec558f-4f13-596e-6649-d221bcb62ea0"/>
<property name="egressTimeout" value="10000"/>
</bean>
</beans>
|
Testing the message flow
Download QuickFIX/J and run the sample they have provided(Banzai-Executor) with modifying configuration as bellow.Here
we are sending a message from Banzai(initiator to port 12000) to
UltraESB(working as an acceptor listening in port 12000) over session
FIX.4.2. After receiving the message from Banzai UltraESB(working as an
initiator) will forward the message to Executor(acceptor listening in
port 9879)
Initiator configuration for Banzai (banzai.cfg)
[default]
FileStorePath=examples/target/data/banzai
ConnectionType=initiator
TargetCompID=UESB
SocketConnectHost=localhost
StartTime=00:00:00
EndTime=23:00:00
HeartBtInt=30
ReconnectInterval=5
SocketConnectPort=12000
[session]
BeginString=FIX.4.2
SenderCompID=BANZAI
|
Acceptor configuration for Executor(executor.cfg)
[default]
FileStorePath=examples/target/data/executor
ConnectionType=acceptor
StartTime=00:00:00
EndTime=23:00:00
HeartBtInt=30
ValidOrderTypes=1,2,F
SenderCompID=EXEC
TargetCompID=UESB
UseDataDictionary=Y
DefaultMarketPrice=12.30
[session]
BeginString=FIX.4.2
SocketAcceptPort=9879
|
Following is the UI provided by QuickFIX/J sample, you can send a message with this UI over session FIX.4.2:BANZAI->UESB.
No comments:
Post a Comment