I have an established FIX connection with a vendor and we are sending heartbeats every thirty seconds. However, due to their system setup, they send me TestRequests (35=1)
at varying intervals along with the heartbeats. I have never had to handle these and the quickfix package is interpreting them as heartbeats. However, this is causing their systems to log me out.
A sample of the messages when I first logon is as follows:
2017-09-05 11:50:47,769 - fix_connection.FIX_IO - INFO - toAdmin >>>>:
8=FIX.4.2|9=78|35=A|34=1|49=***|52=20170905-15:50:47.763|56=XXX|98=0|108=30|141=Y|10=111|
2017-09-05 11:50:48,361 - fix_connection.FIX_IO - INFO - fromAdmin >>>>:
8=FIX.4.2|9=77|35=A|34=1|43=N|49=XXX|52=20170905-15:50:55.062|56=***|98=0|108=30|10=043|
2017-09-05 11:50:48,421 - fix_connection.FIX_IO - INFO - fromAdmin >>>>:
8=FIX.4.2|9=89|35=1|34=2|43=N|49=XXX|52=20170905-15:50:55.119|56=***|112=05/09/2017-11:50:55|10=163|
2017-09-05 11:50:48,437 - fix_connection.FIX_IO - INFO - toAdmin >>>>:
8=FIX.4.2|9=84|35=0|34=2|49=***|52=20170905-15:50:48.428|56=XXX|112=05/09/2017-11:50:55|10=175|
2017-09-05 11:51:18,644 - fix_connection.FIX_IO - INFO - fromAdmin >>>>:
8=FIX.4.2|9=65|35=0|34=3|43=N|49=XXX|52=20170905-15:51:25.341|56=***|10=254|
2017-09-05 11:51:18,657 - fix_connection.FIX_IO - INFO - toAdmin >>>>:
8=FIX.4.2|9=60|35=0|34=3|49=***|52=20170905-15:51:18.649|56=XXX|10=019|
I have already searched for a way to send a TestRequest specifically using the quickfix package, but didn't find anything. Can someone point me in the right direction or provide an example? Much appreciated.
Try this simple piece of code, written in c#. Please check with your vendor the data to send correctly (the "test" in my example).
sessionId
is the Session object with the parameters between you and the counterparty.
public void SendTestRequestMessage() {
QuickFix42.TestRequest req = new QuickFix42.TestRequest();
req.set(new TestReqID("test"));
Session.sendToTarget(req, sessionId);
}