Discussion Forums

Need for BodyLength on FIX messages over TCP Sockets
Mahesh Kumaraguru <>
30 Dec 2010 6:46PM ET

TCP Socket based communications allows only to send packets of data between applications. When a Java application opens a socket and starts reading the input stream, how can the application know how much to read for the current FIX message ? If both BodyLength and Checksum are removed, then how to breakup a stream of bytes into a series of messages? In message oriented middleware, the middleware delivers seperate messages to the application and hence a message BodyLength serves no useful purpose.

My guess is that BodyLength would be required on all FIX messaging over stream oriented network communication protocols which are not message based. The SocketReader reads the BodyLength field and then reads BodyLength bytes to complete the current message.

As per present FIX spec, a FIX Engine would also check

1. The last field at the end of BodyLength bytes is CheckSum field
2. The value of the CheckSum field in the message matches the values of checksum as calculated from the bytes of the message.

If either of the above two checks fail, the received bytes are declared garbled and discarded.

Since FIX has weak CheckSum, I agree CheckSum might have lost its utility and hence deprecated.

> Alex,
>
> I totally agree with your technical point, but let's avoid personal judgement regarding current proposals or about decisions made long ago under different circumstances.
>
> Consider that Ethernet keeps length and check values, and no one calls its designers 'moronic'. Agreed that we don't need to duplicate message integrity guaranteed by an underlying transport.
>
> Let's think of this effort in terms of continuous improvement.
>
> Don
>
> > finally somebody stated the obvios - the message length and check sum are arguably the worst/completely unnecessary "features" of Fix protocol for financial communications. First is just plain stupid - reading from a socket and parsing it byte by byte to figure out a length , while excluding the end of the message - only a business type person could come up with something moronic like that. Second is completely unnecessary for communications going over private networks over TCP(!!!!!!) protocol.
> >
> > Alex
> >
> > > Hi All,
> > >
> > > As discussed during last meeting.
> > > Please find hereafter some ideas for the working group.
> > >
> > > http://www.slideshare.net/GeorgesGomes/ullink-analysis-and-proposal-for-fix-hft-december-2010
> > >
> > > Feel free to comment on this forum thread.
> > >
> > > Kind regards
> > > Merry Christmas
> > > Georges


Food for thought
Georges Gomes   23 Dec 2010 2:21AM ET
Encoding Strings in compact binary form
Mahesh Kumaraguru   26 Dec 2010 3:10PM ET
Re: Encoding Strings in compact binary form
Rolf Andersson / Pantor Engineering   28 Dec 2010 5:42PM ET
Byte versus bit optimization for HFT / FIX over FAST //
Mahesh Kumaraguru   2 Jan 2011 1:06AM ET
Re: Byte versus bit optimization for HFT / FIX over FAST //
Rolf Andersson / Pantor Engineering   2 Jan 2011 1:30AM ET
Re: Encoding Strings in compact binary form
Georges Gomes   5 Jan 2011 3:08AM ET
Re: Encoding Strings in compact binary form
Rolf Andersson / Pantor Engineering   5 Jan 2011 3:44AM ET
Re: Encoding Strings in compact binary form
Mahesh Kumaraguru   5 Jan 2011 4:04AM ET
Re: Encoding Strings in compact binary form
Georges Gomes   5 Jan 2011 4:26AM ET
Re: Food for thought
Vitali Vinokour / Lime Brokerage   28 Dec 2010 11:44AM ET
Re: Food for thought
Rolf Andersson / Pantor Engineering   28 Dec 2010 5:09PM ET
Re: Food for thought
Georges Gomes   5 Jan 2011 3:57AM ET
Flexibility versus performance
Mahesh Kumaraguru   11 Jan 2011 12:55AM ET
Re: Flexibility versus performance
Mark Reece / HSBC   11 Jan 2011 7:34AM ET
Re: Flexibility versus performance
Rolf Andersson / Pantor Engineering   11 Jan 2011 8:25AM ET
Re: Food for thought
alex o / self   30 Dec 2010 4:20PM ET
Re: Food for thought
Donald Mendelson / CME Group   30 Dec 2010 4:58PM ET
Re: Food for thought
Mark Sipos / FIX Flyer LLC   30 Dec 2010 5:17PM ET
Need for BodyLength on FIX messages over TCP Sockets
Mahesh Kumaraguru   30 Dec 2010 6:46PM ET
Re: Food for thought
Philip Beevers / Fidessa   4 Jan 2011 6:59AM ET
Re: Food for thought
Georges Gomes   5 Jan 2011 4:16AM ET
Re: Food for thought
Mahesh Kumaraguru   22 Jan 2011 2:03AM ET