Versions Compared

Key

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

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

In order to use such a functionality it is required to perform the following steps:

...

The configuration section for the SMTP TA usually exists in the 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 the SMTP TA client is configured in the FixEdge.properties file, you could reference it in the BL_Configuration.xml config file.

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

...

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

So you should create a BL rule that will forward such notifications to the SMTP TA client.

 

The example of such a rule:

Code Block
languagebashxml
		<!-- Send email on every session status change. Ignore Temp sessions.-->
		<Rule Description="Send emails with session state change notifications" >
  			<Source>
    				<!—Apply--Apply to each internal message -->
   				<FixSession SenderCompID="fake" TargetCompID="fake" />
  <			</Source>
  			<Condition>
				<!—Apply--Apply to   3535=C only -->
   <MsgType><Val>C</Val><				<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				<Send>
					<Client Name="TestSMTPClient"/><>
				</Send>
  			</Action>
		</Rule>	

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

...