Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

FIXEdge has the possibility to send an e-mail alerts once FIX session changes its status.

In order to use such functionality it is required to:

  1. configure the SMTP transport adaptor (TA);
  2. create a business rule for notifications forwarding.

SMTP TA is configured in FixEdge.properties file.

The configuration section for SMTP TA usually exists in FixEdge.properties file by default – so it is required just to specify the correct ServerName, To, and From properties:

 

Code Block
languagebash
...
# SMTP server host. Required when DefaultServerName not defined
TransportLayer.SmtpTA.SMTPSession.TestSMTPClient.ServerName = mail.test.com
TransportLayer.SmtpTA.SMTPSession.TestSMTPClient.To = user@test.com;
TransportLayer.SmtpTA.SMTPSession.TestSMTPClient.From = user@test.com;
...

Once SMTP TA client is configured in FixEdge.properties file, you could reference it in the BL_Configuration.xml config.

 

Actually, once session changes its state, a fake FIX message (35=C) is generated by FixEdge and routed to Business Layer.

If you examine logs of your FixEdge instance you could find such entries like:

2015-03-26 15:18:12,413 UTC   TRACE   [BL_Layer]  140009470453504  Process incoming message. [8=FIX.4.4 9=189 35=C 49=fake 56=fake 34=1 52=99990909-17:17:17 164=7 94=0 42=20150326-15:17:09 147=[NOTE] FIXEDGE:ICEProxy Established 33=5 58=N 58=1 58=FIXEDGE:ICEProxy 58=Established 58=AttemptToConnect 10=238 ]

The 147 tag is automatically filled by the pattern: [<Category>] <SenderCompID:TargetCompID> <Actual Session state>

 

So you should create BL rule that will forward such notifications to Smtp client. See the example of such rule below:

 

<Rule Description="Send session state change notifications" >

  <Source>

    <!—Apply to each internal message -->

   <FixSession SenderCompID="fake" TargetCompID="fake" />

  </Source>

  <Condition>

<!—Apply to  35=C only -->

   <MsgType><Val>C</Val></MsgType>

<!-- Apply to messages with 147 tag filled with session status  -->

   <MatchField Field="147" Value=".*(AttemptToConnect|Established|Terminated correctly|Non-gracefully terminated)" />

  </Condition>

  <Action>

<!-- Forward the message to SmtpClient  -->

   <Send><Client Name="TestSMTPClient"/></Send>

  </Action>

</Rule>

 

This rule sends the notification to smpt client if any of configured FIX sessions changes its state.

If it is required to send notifications for particular FIX session and|or particular state you could modify the regexp:  <MatchField Field="147" Value=… /> to achieve that.