Working with custom logon procedures

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Working with custom logon procedures

William Dunne
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/



After a few hours of experimentation with quickfixj, and not having all that much luck, I decided to start messing about with the executor. I got to a similar stage to where I was at before, which is successful session initialization, but I can't for some reason intercept the logon!

Neither of these produce any results:

@Override
public void onMessage(quickfix.fix44.Logon message, SessionID sessionID) throws FieldNotFound, UnsupportedMessageType, IncorrectTagValue
{
System.out.println("Login");
System.out.println(message.getPassword().toString());
}

@Override
public void onMessage(Message message, SessionID sessionID)
{
System.out.println("Message");
}
While if the login was failing, this wouldn't be surprising. The login is being received, and is responding successfully. However, see log below:

<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, incoming> (8=FIX.4.49=9235=A34=149=MIMCLIENT52=20150914-17:57:07.69056=MIMSERVER98=0108=30141=Y554=password10=233)
<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, event> (Accepting session FIX.4.4:MIMSERVER->MIMCLIENT from /127.0.0.1:50117)
<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, event> (Acceptor heartbeat set to 30 seconds)
<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, event> (Logon contains ResetSeqNumFlag=Y, resetting sequence numbers to 1)
<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, event> (Received logon)
<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, outgoing> (8=FIX.4.49=7935=A34=149=MIMSERVER52=20150914-17:57:07.70956=MIMCLIENT98=0108=30141=Y10=160)
<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, event> (Responding to logon request)


All of this is simply added within the Application class of the Executor example - any idea why this isn't working? It follows the exact format of the other ones.

------------------------------------------------------------------------------

_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: Working with custom logon procedures

thannon
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/



Try overriding the onLogon method…

@Override
public void onLogon(SessionID sessionID)
{
}


On Sep 14, 2015, at 1:10 PM, William Dunne <[hidden email]> wrote:

QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/


After a few hours of experimentation with quickfixj, and not having all that much luck, I decided to start messing about with the executor. I got to a similar stage to where I was at before, which is successful session initialization, but I can't for some reason intercept the logon!

Neither of these produce any results:

@Override
public void onMessage(quickfix.fix44.Logon message, SessionID sessionID) throws FieldNotFound, UnsupportedMessageType, IncorrectTagValue
{
System.out.println("Login");
System.out.println(message.getPassword().toString());
}

@Override
public void onMessage(Message message, SessionID sessionID)
{
System.out.println("Message");
}
While if the login was failing, this wouldn't be surprising. The login is being received, and is responding successfully. However, see log below:

<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, incoming> (8=FIX.4.49=9235=A34=149=MIMCLIENT52=20150914-17:57:07.69056=MIMSERVER98=0108=30141=Y554=password10=233)
<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, event> (Accepting session FIX.4.4:MIMSERVER->MIMCLIENT from /127.0.0.1:50117)
<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, event> (Acceptor heartbeat set to 30 seconds)
<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, event> (Logon contains ResetSeqNumFlag=Y, resetting sequence numbers to 1)
<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, event> (Received logon)
<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, outgoing> (8=FIX.4.49=7935=A34=149=MIMSERVER52=20150914-17:57:07.70956=MIMCLIENT98=0108=30141=Y10=160)
<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, event> (Responding to logon request)


All of this is simply added within the Application class of the Executor example - any idea why this isn't working? It follows the exact format of the other ones.
------------------------------------------------------------------------------
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users


------------------------------------------------------------------------------

_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: Working with custom logon procedures

Christoph John
In reply to this post by William Dunne
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/



Hi,
you need to use from/toAdmin() callback in your application to intercept session level messages.
Cheers


Am 14. September 2015 20:10:36 MESZ, schrieb William Dunne <[hidden email]>:
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/


After a few hours of experimentation with quickfixj, and not having all that much luck, I decided to start messing about with the executor. I got to a similar stage to where I was at before, which is successful session initialization, but I can't for some reason intercept the logon!

Neither of these produce any results:

@Override
public void onMessage(quickfix.fix44.Logon message, SessionID sessionID) throws FieldNotFound, UnsupportedMessageType, IncorrectTagValue
{
System.out.println("Login");
System.out.println(message.getPassword().toString());
}

@Override
public void onMessage(Message message, SessionID sessionID)
{
System.out.println("Message");
}
While if the login was failing, this wouldn't be surprising. The login is being received, and is responding successfully. However, see log below:

<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, incoming> (8=FIX.4.4 9=92 35=A 34=1 49=MIMCLIENT 52=20150914-17:57:07.690 56=MIMSERVER 98=0 108=30 141=Y 554=password 10=233 )
<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, event> (Accepting session FIX.4.4:MIMSERVER->MIMCLIENT from /127.0.0.1:50117)
<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, event> (Acceptor heartbeat set to 30 seconds)
<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, event> (Logon contains ResetSeqNumFlag=Y, resetting sequence numbers to 1)
<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, event> (Received logon)
<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, outgoing> (8=FIX.4.4 9=79 35=A 34=1 49=MIMSERVER 52=20150914-17:57:07.709 56=MIMCLIENT 98=0 108=30 141=Y 10=160 )
<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, event> (Responding to logon request)


All of this is simply added within the Application class of the Executor example - any idea why this isn't working? It follows the exact format of the other ones.





Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users

------------------------------------------------------------------------------

_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: Working with custom logon procedures

Grant Birchmeier
In reply to this post by William Dunne
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/



Logon is an admin message, therefore you must use the fromAdmin callback.  As this callback responds to all admin messages (e.g. heartbeats, logout, test request, etc), you must examine field 35 to know if it's a logon.

And of course, remember that there is an onLogon callback as well, though it doesn't give you the message.

On Mon, Sep 14, 2015 at 1:10 PM, William Dunne <[hidden email]> wrote:
QuickFIX/J Documentation: <a href="http://www.quickfixj.org/documentation/ QuickFIX/J" rel="noreferrer" target="_blank">http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/



After a few hours of experimentation with quickfixj, and not having all that much luck, I decided to start messing about with the executor. I got to a similar stage to where I was at before, which is successful session initialization, but I can't for some reason intercept the logon!

Neither of these produce any results:

@Override
public void onMessage(quickfix.fix44.Logon message, SessionID sessionID) throws FieldNotFound, UnsupportedMessageType, IncorrectTagValue
{
System.out.println("Login");
System.out.println(message.getPassword().toString());
}

@Override
public void onMessage(Message message, SessionID sessionID)
{
System.out.println("Message");
}
While if the login was failing, this wouldn't be surprising. The login is being received, and is responding successfully. However, see log below:

<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, incoming> (8=FIX.4.4 9=92 35=A 34=1 49=MIMCLIENT 52=20150914-17:57:07.690 56=MIMSERVER 98=0 108=30 141=Y 554=password 10=233 )
<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, event> (Accepting session FIX.4.4:MIMSERVER->MIMCLIENT from /127.0.0.1:50117)
<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, event> (Acceptor heartbeat set to 30 seconds)
<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, event> (Logon contains ResetSeqNumFlag=Y, resetting sequence numbers to 1)
<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, event> (Received logon)
<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, outgoing> (8=FIX.4.4 9=79 35=A 34=1 49=MIMSERVER 52=20150914-17:57:07.709 56=MIMCLIENT 98=0 108=30 141=Y 10=160 )
<20150914-17:57:07, FIX.4.4:MIMSERVER->MIMCLIENT, event> (Responding to logon request)


All of this is simply added within the Application class of the Executor example - any idea why this isn't working? It follows the exact format of the other ones.

------------------------------------------------------------------------------

_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users




--
Grant Birchmeier
Connamara Systems, LLC
Made-To-Measure Trading Solutions.
Exactly what you need. No more. No less.

------------------------------------------------------------------------------

_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: Working with custom logon procedures

William Dunne
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/


Thank you. Yes, this worked. I'll blame it on working at the end of a 36
hour marathon.

------------------------------------------------------------------------------
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users