FIX Antenna library provides access to embedded monitoring and administrative functionality by means of usual sessions. Creation of an admin session requires configuring the parameters:
autostart.acceptor.targetIds autostart.acceptor.targetId.login autostart.acceptor.targetId.password autostart.acceptor.targetId.ip autostart.acceptor.targetId.fixServerListener
and creating a FIX session with one of configured parameters of TargetCompID (autostart.acceptor.targetIds).
By default these parameters have the following values:
autostart.acceptor.targetIds=admin,admin1 autostart.acceptor.admin.login=admin autostart.acceptor.admin.password=admin autostart.acceptor.admin.ip=* autostart.acceptor.admin.fixServerListener=com.epam.admintool.AdminTool autostart.acceptor.admin1.login=admin1 autostart.acceptor.admin1.password=admin1 autostart.acceptor.admin1.ip=* autostart.acceptor.admin1.fixServerListener=com.epam.admintool.AdminTool
All FIX messages from a client of such session are transferred to AdminTool class, where they are handled. FIX XML message (MsgType = n) is used to transport commands or execution results in the XML form.
An example of a FIX XML message with command:
8=FIX.4.49=17435=n49=MonitoringTool56=FIXADMIN34=252=20050811-12:22:53212=89213=<?xml version="1.0" encoding="utf-8"?> <ToBackup> <SenderCompID>TestSender</SenderCompID> <TargetCompID>TestTarget</TargetCompID> </ToBackup>10=012
An example of a FIX XML message with response:
8=FIX.4.49=18235=n49=FIXADMIN56=MonitoringTool34=252=20050811-12:22:55212=97213=<?xml version="1.0" encoding="utf-8"?> <Response ResultCode="3"> <Description>Unknown session</Description> </Response>10=043
The customer has an opportunity to extend basic functionality:
autostart.acceptor.command.package=com.mycompany.admincommands
Each response of RAI has special ResultCode attribute.
Code | Description |
0 | This result code indicates that RIA has successfully processed the request. |
1 | The requested operation is not implemented. |
3 | The RAI can't find requested session. |
6 | The RAI thrown unexpected error during processing request of client. |
7 | The client request was rejected. |
9 | The client request has an invalid parameter. |
Monitoring and administrative commands as well as execution results are transported by means of FIX XML messages (MsgType = n).
<SessionsList RequestID="1">
<SubscriptionRequestType>1</SubscriptionRequestType>
</SessionsList>
<Response ResultCode="0" RequestID="1"> <SessionsListData> <Session> <SenderCompID>admin</SenderCompID> <TargetCompID>FIXICC</TargetCompID> <Timestamp>2010-03-26T16:54:03.443+02:00</Timestamp> <Status>CONNECTED</Status> <StatusGroup>ESTABLISHED</StatusGroup> <Action>NEW</Action> </Session> </SessionsListData> </Response>
<SessionsSnapshot RequestID="1">
<View>STATUS_PARAMS</View>
</SessionsSnapshot>
<Response ResultCode="0" RequestID="1"> <SessionsSnapshotData> <Session> <SenderCompID>admin</SenderCompID> <TargetCompID>FIXICC</TargetCompID> <StatusData> <Status>CONNECTED</Status> <StatusGroup>ESTABLISHED</StatusGroup> <BackupState>PRIMARY</BackupState> <InSeqNum>3</InSeqNum> <OutSeqNum>3</OutSeqNum> </StatusData> <ParamsData> <Version>FIX44</Version> <Role>ACCEPTOR</Role> <RemoteHost>127.0.0.1</RemoteHost> <RemotePort>1694</RemotePort> <ExtraSessionParams> <HBI>120</HBI> <StorageType>PERSISTENT</StorageType> <EnableMessageRejecting>true</EnableMessageRejecting> <ClientType>GENERIC</ClientType> <ReconnectMaxTries>-1</ReconnectMaxTries> <InSeqNum>4</InSeqNum> <OutSeqNum>4</OutSeqNum> <ForceSeqNumReset>ALWAYS</ForceSeqNumReset> </ExtraSessionParams> </ParamsData> </Session> </SessionsSnapshotData> </Response>
<SessionParams RequestID="3">
<SenderCompID>admin</SenderCompID>
<TargetCompID>FIXICC</TargetCompID>
</SessionParams>
<Response ResultCode="0" RequestID="3"> <SessionParamsData> <SenderCompID>admin</SenderCompID> <TargetCompID>FIXICC</TargetCompID> <Version>FIX44</Version> <Role>ACCEPTOR</Role> <RemoteHost>127.0.0.1</RemoteHost> <RemotePort>1694</RemotePort> <ExtraSessionParams> <HBI>120</HBI> <StorageType>PERSISTENT</StorageType> <EnableMessageRejecting>true</EnableMessageRejecting> <ClientType>GENERIC</ClientType> <ReconnectMaxTries>-1</ReconnectMaxTries> <InSeqNum>4</InSeqNum> <OutSeqNum>4</OutSeqNum> <ForceSeqNumReset>ALWAYS</ForceSeqNumReset> </ExtraSessionParams> </SessionParamsData> </Response>
<SessionStatus RequestID="2">
<SenderCompID>admin</SenderCompID>
<TargetCompID>FIXICC</TargetCompID>
</SessionStatus>
<Response ResultCode="0" RequestID="2"> <SessionStatusData> <SenderCompID>admin</SenderCompID> <TargetCompID>FIXICC</TargetCompID> <Status>CONNECTED</Status> <StatusGroup>ESTABLISHED</StatusGroup> <BackupState>PRIMARY</BackupState> <InSeqNum>3</InSeqNum> <OutSeqNum>3</OutSeqNum> </SessionStatusData> </Response>
<SessionStat RequestID="15">
<SenderCompID>TestSender</SenderCompID>
<TargetCompID>TestTarget</TargetCompID>
</SessionStat>
<Response ResultCode="0" RequestID="15"> <SessionStatData> <SenderCompID>TestSender</SenderCompID> <TargetCompID>TestTarget</TargetCompID> <ReceivedBytes>5107901</ReceivedBytes> <SentBytes>6445854</SentBytes> <ReceivedMessages>25539</ReceivedMessages> <SentMessages>32229</SentMessages> <Established>2008-05-13T07:55:23</Established> <TerminatedNormal>2008-05-13T07:51:34</TerminatedNormal> <TerminatedAbnormal>2008-05-10T15:43:11</TerminatedAbnormal> <LastReceivedMessage>2008-05-13T18:21:10</LastReceivedMessage> <LastSentMessage>2008-05-13T18:21:10</LastSentMessage> </SessionStatData> </Response>
<GeneralSessionsStat RequestID="25"/>
<Response ResultCode="0" RequestID="25"> <GeneralSessionsStatData> <ActiveSessions>2</ActiveSessions> <ReconnectingSessions>1</ReconnectingSessions> <AwaitingSessions>0</AwaitingSessions> <TerminatedNormalSessions>32</TerminatedNormalSessions> <TerminatedAbnormalSessions>5</TerminatedAbnormalSessions> <NumOfProcessedMessages>10345</NumOfProcessedMessages> <MaxSessionLifetime>204580</MaxSessionLifetime> <MinSessionLifetime>4523</MinSessionLifetime> <LastSessionCreation>2008-05-13T18:21:10</LastSessionCreation> </GeneralSessionsStatData> </Response>
<ReceivedStat RequestID="10"/>
<Response ResultCode="0" RequestID="10"> <ReceivedStatData> <ReceivedMessages>76617</ReceivedMessages> </ReceivedStatData> </Response>
<SentStat RequestID="20"/>
<Response ResultCode="0" RequestID="20"> <SentStatData> <SentMessages>96687</SentMessages> </SentStatData> </Response>
<ProceedStat RequestID="30"/>
<Response ResultCode="0" RequestID="30"> <ProceedStatData> <ProceedMessages>173304</ProceedMessages> </ProceedStatData> </Response>
<CreateInitiator RequestID="46"> <SenderCompID>TEST</SenderCompID> <TargetCompID>TEST2</TargetCompID> <Version>FIX44</Version> <RemoteHost>localhost</RemoteHost> <RemotePort>3000</RemotePort> <ExtraSessionParams> <SenderSubID>TEST_SUB</SenderSubID> <TargetSubID>TEST2_SUB</TargetSubID> <HBI>30</HBI> <StorageType>PERSISTENT</StorageType> <MaxMessagesAmountInBunch>100</MaxMessagesAmountInBunch> <EnableMessageRejecting>false</EnableMessageRejecting> <SocketOpPriority>EVEN</SocketOpPriority> <ForcedReconnect>false</ForcedReconnect> <DisableTCPBuffer>false</DisableTCPBuffer> <ForceSeqNumReset>ON</ForceSeqNumReset> <IntradayLogoutToleranceMode>false</IntradayLogoutToleranceMode> <IgnoreSeqNumTooLowAtLogon>false</IgnoreSeqNumTooLowAtLogon> <EncryptMethod>NONE</EncryptMethod> </ExtraSessionParams> </CreateInitiator>
<Response ResultCode="0" RequestID="46"> <Description>CreateInitiator completed</Description> </Response>
<ToBackup RequestID="35">
<SenderCompID>TestSender</SenderCompID>
<TargetCompID>TestTarget</TargetCompID>
</ToBackup>
<Response ResultCode="0" RequestID="35"> <Description>ToBackup completed</Description> </Response>
<ToPrimary RequestID="35">
<SenderCompID>TestSender</SenderCompID>
<TargetCompID>TestTarget</TargetCompID>
</ToPrimary>
<Response ResultCode="0" RequestID="35"> <Description>ToPrimary completed</Description> </Response>
<Delete RequestID="35"> <SenderCompID>TestSender</SenderCompID> <TargetCompID>TestTarget</TargetCompID> <SendLogout>true</SendLogout> <LogoutReason>Evacuation</LogoutReason> </Delete>
<Response ResultCode="0" RequestID="35"> <Description>Delete completed</Description> </Response>
<DeleteAll RequestID="95"> <SendLogout>true</SendLogout> <LogoutReason>Evacuation</LogoutReason> </DeleteAll>
<Response ResultCode="0" RequestID="95"> <Description>DeleteAll completed</Description> </Response>
<ChangeSeqNum RequestID="45">
<SenderCompID>TestSender</SenderCompID>
<TargetCompID>TestTarget</TargetCompID>
<InSeqNum>100</InSeqNum>
<OutSeqNum>100</OutSeqNum>
</ChangeSeqNum>
<Response ResultCode="0" RequestID="45"> <Description>ChangeSeqNum completed</Description> </Response>
<ResetSeqNum RequestID="55">
<SenderCompID>TestSender</SenderCompID>
<TargetCompID>TestTarget</TargetCompID>
</ResetSeqNum>
<Response ResultCode="0" RequestID="55"> <Description>ResetSeqNum completed</Description> </Response>
<TestRequest RequestID="65">
<SenderCompID>TestSender</SenderCompID>
<TargetCompID>TestTarget</TargetCompID>
<TestReqID>12345576</TestReqID>
</TestRequest>
<Response ResultCode="0" RequestID="65"> <Description>TestRequest completed</Description> </Response>
<Heartbeat RequestID="75">
<SenderCompID>TestSender</SenderCompID>
<TargetCompID>TestTarget</TargetCompID>
</Heartbeat>
<Response ResultCode="0" RequestID="75"> <Description>"beat"</Description> </Response>
<SendMessage RequestID="85">
<SenderCompID>TestSender</SenderCompID>
<TargetCompID>TestTarget</TargetCompID>
<Message>8=FIX.4.29=05635=849=THEM56=US37=117=134=53011=00492-0476150=039=010=161</Message>
</SendMessage>
<Response ResultCode="0" RequestID="85"> <Description>SendMessage completed</Description> </Response>
<Help RequestID="100"/>
<Response ResultCode="0" RequestID="100"> <HelpData> ... </HelpData> </Response>