Session Question

Imported from previous forum

I’m new to FIX so bear with me!

Reading FIX 4.2 specification, I still can’t quite grasp the concept of a Session. I keep feeling I ought to be able to find a “Session ID” so that I could effectively name an ordered sequence of messages.

So if I had a server that could open two sessions for two clients, how do you tell which messages are who’s?

If I were to open a single session, and put it in a TCP session, then it would be obvious. If I were to use UDP (for example) then I would get messages sent out of order. I read the warnings about a receiver may have to re-order messages if they arrive out of order - but how? If a "session id" named the sequence it would be easy.

Thanks

Mark
COMPAQ Global Services

In practice a FIX session is almost always in a TCP session. If you used UDP, you would most likely use different UDP ports as you probably don’t want to send an ExecRpt to more than one firm.

>
> I’m new to FIX so bear with me!
>
> Reading FIX 4.2 specification, I still can’t quite grasp the concept of a Session. I keep feeling I ought to be able to find a “Session ID” so that I could effectively name an ordered sequence of messages.
>
> So if I had a server that could open two sessions for two clients, how do you tell which messages are who’s?
>
> If I were to open a single session, and put it in a TCP session, then it would be obvious. If I were to use UDP (for example) then I would get messages sent out of order. I read the warnings about a receiver may have to re-order messages if they arrive out of order - but how? If a “session id” named the sequence it would be easy.
>
> Thanks
>
> Mark
> COMPAQ Global Services
>

[ original email was from Grant Robertson - grantrob@ms.com ]
I think the key to session management in FIX is in the SenderCompID and TargetCompID fields in the standard header.

Take your example of two clients connecting from the same server. They are, I presume, talking to the same FIX agent at the other end of the wire. In this situation the messages would have the same TargetCompID but different SenderCompIDs. When the recipient wants to send responses back to you they would flip the two fields so that SenderCompID would now signify "them" and the TargetCompID would now be whichever of your users or processes the response is destined for. Thus you can easily route it at your end.

>
> I’m new to FIX so bear with me!
>
> Reading FIX 4.2 specification, I still can’t quite grasp the concept of a Session. I keep feeling I ought to be able to find a “Session ID” so that I could effectively name an ordered sequence of messages.
>
> So if I had a server that could open two sessions for two clients, how do you tell which messages are who’s?
>
> If I were to open a single session, and put it in a TCP session, then it would be obvious. If I were to use UDP (for example) then I would get messages sent out of order. I read the warnings about a receiver may have to re-order messages if they arrive out of order - but how? If a “session id” named the sequence it would be easy.
>
> Thanks
>
> Mark
> COMPAQ Global Services
>

thanks for the online and offline replies. I think I understand how people do this now and why it’s not an issue in practice.