Send a new line at the end of each Fix message

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

Send a new line at the end of each Fix message

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




Hi all,

I am new to quickfix and would require your support in understanding the quickfixj api. The service which we are planing to use requires each FIX message be terminated by a newline character and I would like to know if quickfixj api be used to add a new line character.

Appreciate your help.

Thanks
- Arul Prashanth.

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

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

Re: Send a new line at the end of each Fix message

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



A newline character?

That is not FIX compliant.  Either you are misunderstanding the requirement, or your desired service is doing something extremely unorthodox (and basically illegal per standard FIX).

On Tue, Aug 18, 2015 at 1:57 AM, Prashanth Arul <[hidden email]> wrote:
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J
Support: http://www.quickfixj.org/support/




Hi all,

I am new to quickfix and would require your support in understanding the quickfixj api. The service which we are planing to use requires each FIX message be terminated by a newline character and I would like to know if quickfixj api be used to add a new line character.

Appreciate your help.

Thanks
- Arul Prashanth.

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

_______________________________________________
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: Send a new line at the end of each Fix message

arul.prashanth
This is what I see from the service provider specs. When I add a \n to the end of the message am able to logon else am not getting a response from the Service.

Message Terminator

All FIX messages must terminate in \n after the standard FIX termination of 10=checksum. The client
platform must parse the \n after incoming messages from the server as well as add them to all requests
sent to the server.
Reply | Threaded
Open this post in threaded view
|

Re: Send a new line at the end of each Fix message

Øyvind Matheson Wergeland
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/



Hi Arul,

Looks like you got no choice.

I believe you have to modify the codebase, classes FIXMessageEncoder and FIXMessageDecoder.

Try to add the newline to the end of the message before the ByteBuffer is allocated to send it:
fixMessageString += '\n';
ByteBuffer buffer = ByteBuffer.allocate(fixMessageString.length());

And add it to the checksum pattern when reading.
CHECKSUM_PATTERN = getBytes("10=???" + delimiter + "\n");

Completely untested, and no warranty....



Best regards

Øyvind Matheson Wergeland
CTO


Mobile: (+47) 95 16 16 88
E-mail: [hidden email]

Oslo Market Solutions
PO Box 4, 0051 Oslo, Norway
Telephone: (+47) 40 00 23 13
www.oslomarketsolutions.no

On 08/18/2015 04:22 PM, arul.prashanth wrote:
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/


This is what I see from the service provider specs. When I add a \n to the
end of the message am able to logon else am not getting a response from the
Service.

Message Terminator

All FIX messages must terminate in \n after the standard FIX termination of
10=checksum. The client 
platform must parse the \n after incoming messages from the server as well
as add them to all requests 
sent to the server.



--
View this message in context: http://quickfix-j.364392.n2.nabble.com/Send-a-new-line-at-the-end-of-each-Fix-message-tp7579157p7579160.html
Sent from the QuickFIX/J mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
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: Send a new line at the end of each Fix message

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


You are not connecting to the counterparty via FIX protocol over TCP/IP, are you? Sounds more like a
MQ based connection.

Chris.


On 18/08/15 16:22, arul.prashanth wrote:

> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
>
>
> This is what I see from the service provider specs. When I add a \n to the
> end of the message am able to logon else am not getting a response from the
> Service.
>
> Message Terminator
>
> All FIX messages must terminate in \n after the standard FIX termination of
> 10=checksum. The client
> platform must parse the \n after incoming messages from the server as well
> as add them to all requests
> sent to the server.
>
>
>
> --
> View this message in context: http://quickfix-j.364392.n2.nabble.com/Send-a-new-line-at-the-end-of-each-Fix-message-tp7579157p7579160.html
> Sent from the QuickFIX/J mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Quickfixj-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users

--
Christoph John
Development & Support
Direct: +49 241 557080-28
Mailto:[hidden email]
       


http://www.macd.com <http://www.macd.com/>
----------------------------------------------------------------------------------------------------
       
----------------------------------------------------------------------------------------------------
MACD GmbH
Oppenhoffallee 103
D-52066 Aachen
Tel: +49 241 557080-0 | Fax: +49 241 557080-10
         Amtsgericht Aachen: HRB 8151
Ust.-Id: DE 813021663

Geschäftsführer: George Macdonald
----------------------------------------------------------------------------------------------------
       
----------------------------------------------------------------------------------------------------

take care of the environment - print only if necessary

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

Re: Send a new line at the end of each Fix message

arul.prashanth
Nope am using the regular TCP/IP connection.

I was ableto logon successfully with a standard socket program with the below said approach
buffer = buffer + "10=" + checksum + "\n";

but with quickfix am not able to. Not sure if am missing any.
Reply | Threaded
Open this post in threaded view
|

Re: Send a new line at the end of each Fix message

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



I'm curious to what FIX engine doesn't use the checksum to determine the end of message. 

On Tue, Aug 18, 2015 at 10:14 AM, arul.prashanth <[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/


Nope am using the regular TCP/IP connection.

I was ableto logon successfully with a standard socket program with the
below said approach
buffer = buffer + "10=" + checksum + "\n";

but with quickfix am not able to. Not sure if am missing any.



--
View this message in context: http://quickfix-j.364392.n2.nabble.com/Send-a-new-line-at-the-end-of-each-Fix-message-tp7579157p7579163.html
Sent from the QuickFIX/J mailing list archive at Nabble.com.

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



--
Ishmael Rufus - Programmer 
Ditto Holdings, Inc. 
200 W. Monroe St. 
Suite 1430
Chicago, IL 60606
(312)263-5400

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

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

Re: Send a new line at the end of each Fix message

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


Oops, OK. Then I think you'll have to take the route that Øyvind suggested, meaning that you'll have
to alter the code. Maybe you are able to persuade the counterparty that what they do is not FIX
protocol compliant and that they should drop the end-of-line requirement. But I guess that is
pointless since the counterparty is a much bigger company and was doing it this way for years. ;)

Chris.


On 18/08/15 17:14, arul.prashanth wrote:

> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
>
>
> Nope am using the regular TCP/IP connection.
>
> I was ableto logon successfully with a standard socket program with the
> below said approach
> buffer = buffer + "10=" + checksum + "\n";
>
> but with quickfix am not able to. Not sure if am missing any.
>
>
>
> --
> View this message in context: http://quickfix-j.364392.n2.nabble.com/Send-a-new-line-at-the-end-of-each-Fix-message-tp7579157p7579163.html
> Sent from the QuickFIX/J mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Quickfixj-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users

--
Christoph John
Development & Support
Direct: +49 241 557080-28
Mailto:[hidden email]
       


http://www.macd.com <http://www.macd.com/>
----------------------------------------------------------------------------------------------------
       
----------------------------------------------------------------------------------------------------
MACD GmbH
Oppenhoffallee 103
D-52066 Aachen
Tel: +49 241 557080-0 | Fax: +49 241 557080-10
         Amtsgericht Aachen: HRB 8151
Ust.-Id: DE 813021663

Geschäftsführer: George Macdonald
----------------------------------------------------------------------------------------------------
       
----------------------------------------------------------------------------------------------------

take care of the environment - print only if necessary

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

Re: Send a new line at the end of each Fix message

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



Yeah, your counterparty is doing something very un-FIX-like, so unfortunately there probably aren't any FIX engines that will work right out of the box.

If you want to use QF, you'll have to hack it so that it can send and receive messages that end in newlines.

On Tue, Aug 18, 2015 at 10:21 AM, Christoph John <[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/


Oops, OK. Then I think you'll have to take the route that Øyvind suggested, meaning that you'll have
to alter the code. Maybe you are able to persuade the counterparty that what they do is not FIX
protocol compliant and that they should drop the end-of-line requirement. But I guess that is
pointless since the counterparty is a much bigger company and was doing it this way for years. ;)

Chris.


On 18/08/15 17:14, arul.prashanth wrote:
> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
>
>
> Nope am using the regular TCP/IP connection.
>
> I was ableto logon successfully with a standard socket program with the
> below said approach
> buffer = buffer + "10=" + checksum + "\n";
>
> but with quickfix am not able to. Not sure if am missing any.
>
>
>
> --
> View this message in context: http://quickfix-j.364392.n2.nabble.com/Send-a-new-line-at-the-end-of-each-Fix-message-tp7579157p7579163.html
> Sent from the QuickFIX/J mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Quickfixj-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users

--
Christoph John
Development & Support
Direct: <a href="tel:%2B49%20241%20557080-28" value="+4924155708028">+49 241 557080-28
Mailto:[hidden email]



http://www.macd.com <http://www.macd.com/>
----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------
MACD GmbH
Oppenhoffallee 103
D-52066 Aachen
Tel: <a href="tel:%2B49%20241%20557080-0" value="+492415570800">+49 241 557080-0 | Fax: <a href="tel:%2B49%20241%20557080-10" value="+4924155708010">+49 241 557080-10
         Amtsgericht Aachen: HRB 8151
Ust.-Id: DE 813021663

Geschäftsführer: George Macdonald
----------------------------------------------------------------------------------------------------

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

take care of the environment - print only if necessary

------------------------------------------------------------------------------
_______________________________________________
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: Send a new line at the end of each Fix message

Tod Harter
In reply to this post by arul.prashanth
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/




On Tue, Aug 18, 2015 at 10:20 AM, <[hidden email]> wrote:
Message: 5
Date: Tue, 18 Aug 2015 08:14:55 -0700 (MST)
From: "arul.prashanth" <[hidden email]>
Subject: Re: [Quickfixj-users] Send a new line at the end of each Fix
        message
To: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=us-ascii

Nope am using the regular TCP/IP connection.

I was ableto logon successfully with a standard socket program with the
below said approach
buffer = buffer + "10=" + checksum + "\n";

but with quickfix am not able to. Not sure if am missing any.

This is an actual broker? Did they do something foolish like try to roll their own FIX engine? They are clearly non-compliant at the basic message transport level. If this is some client of yours that you are writing code to interact with, I'd heavily advise them to either use QF (of some flavor) or buy something commercial. If its a service provider, they're idiots if they break the FIX standard, there's a million others out there and I know for instance I won't bother to do business with them, lol.

My bet is they rolled some code of their own because they think they can 'do it faster' and they've just taken liberties, or made a mistake. MUCH better to fix it on their end than to get into the swamp of trying to hack QF/J to do nonstandard things that there's no good reason anyone should do in the first place.

“Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing had happened.” -Winston Churchill

"Sometimes I wonder whether the world is being run by smart people who are putting us on, or by imbeciles who really mean it." - Mark Twain

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

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

Re: Send a new line at the end of each Fix message

arul.prashanth
Yeah I agree, will try to reach out to them as to why do they expect this. Thanks everyone for the inputs.

As vyind suggested I made a code change to the quickfixj core Message.java. Updated the toString method to return sb.toString()+"\n" and seems to work now