I have two Fix Sessions with identical SessionIDs (this can't be changed, since the server side specifies the values for SenderCompID and TargetCompID). I learnt that I can use a SessionQualifier in the config file to disambiguate the two Sessions.
#config for session 1
SenderCompID=Sender
TargetCompID=Target
SessionQualifier=FirstSession
......
#config for session 2
SenderCompID=Sender
TargetCompID=Target
SessionQualifier=SecondSession
......
Now when I were to send a message via a particular session,
QuickFix.Session.SendToTarget(msg, sessionID);
//where sessionID = "FIX.4.4:Sender->Target" which is identical for both sessions
what should I do to tell the computer to send it through which session?