Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AF76FD358 for ; Wed, 30 Jan 2013 06:27:16 +0000 (UTC) Received: (qmail 44773 invoked by uid 500); 30 Jan 2013 06:27:16 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 44579 invoked by uid 500); 30 Jan 2013 06:27:14 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 44264 invoked by uid 99); 30 Jan 2013 06:27:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jan 2013 06:27:13 +0000 Date: Wed, 30 Jan 2013 06:27:13 +0000 (UTC) From: "Yogesh Rao (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-5979) Camel-Quickfix dynamic SenderSubId/TargetSubId issue MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-5979?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1356= 6212#comment-13566212 ]=20 Yogesh Rao commented on CAMEL-5979: ----------------------------------- Hello Christian, Answer to your comments=20 1. Yes the issue persists, It was my bad that i mentioned in the descriptio= n that the SessionID is recreated from out Message whereas i should have wr= itten it is being constructed from in message. 2. Yes the only change i have done to the trunk code is instead of=20 SessionID messageSessionID =3D MessageUtils.getReverseSessionID(exchang= e.getIn().getBody(quickfix.Message.class)); I have used is the already created session which is set as part of heade= r, for which the code change is SessionID messageSessionID =3D exchange.getIn().getHeader("SessionID",S= essionID.class); This helps me pick up the same session from which the request had come in.= =20 3. I think that is already being done. Its just that in the code we trying = to recreate a new sessionID instead of using the already set SessionID foun= d as part of the header. I will modify my description to reflect "in message" instead of "out messag= e" for tracking purposes. I am also trying to think would there be a scenar= io wherein the already written code would hold good then perhaps we might h= ave to toggle the SessionID creation based on some property/switch. Thank you! =20 =20 > Camel-Quickfix dynamic SenderSubId/TargetSubId issue > ---------------------------------------------------- > > Key: CAMEL-5979 > URL: https://issues.apache.org/jira/browse/CAMEL-5979 > Project: Camel > Issue Type: New Feature > Components: camel-quickfix > Affects Versions: 2.10.3 > Environment: QuickFix/J version 1.5 on JDK 1.6.x > Reporter: Yogesh Rao > Priority: Minor > Fix For: Future > > > I am facing an issue with camel-quickfix component for the following scen= ario. > We have a FIX message coming in to the Quickfix/J engine i.e. logon reque= st with only the senderID and TargetID populated and the engine successfull= y processes the logon request based on the configuration. The subsequent re= quests for Single Order (Tag # 35 =3D D) the message received contains the = optional values SenderSubID and TargetSubID populated, the message is picke= d up by the camel component without any issue but its only when a reply has= to sent to the sender the component ends up throwing a error i.e. IllegalS= tateException : Unknown Session... I looked into the code https://svn.apach= e.org/repos/asf/camel/trunk/components/camel-quickfix/src/main/java/org/apa= che/camel/component/quickfixj/QuickfixjConsumer.java and found the issue. T= he session ID is being reconstructed from the out value being set into the = exchange object which as per API used would construct the session containin= g SenderID,SenderSubID,TargetID and TargetSubID which is getting compared t= o the session set during the logon process which only contains the SenderID= and TargetID and hence doesn't matches and returns a null. On receiving th= e null value the code ends up throwing the IllegalStateException. Looking a= t the QuickFixJConsumer code i do understand the importance of reconstructi= ng the SessionID object from the Message set as Out in Exchange but from wh= at i read about various client implementations on using FIX the above scena= rio mentioned also holds good. For now I have gone ahead and patched the Qu= ickFixJConsumer code for my project by picking up the session id set in Exc= hange object rather than recreating it using the MessageUtils. But i feel i= n a longer run a elegant solution has to be put in place rather than user o= f camel patching the code up for their use:)=20 > In case you need any further details do let me know..=20 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira