camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yogesh Rao (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-5979) Camel-Quickfix dynamic SenderSubId/TargetSubId issue
Date Wed, 30 Jan 2013 06:27:13 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-5979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13566212#comment-13566212
] 

Yogesh Rao commented on CAMEL-5979:
-----------------------------------

Hello Christian,

Answer to your comments 

1. Yes the issue persists, It was my bad that i mentioned in the description that the SessionID
is recreated from out Message whereas i should have written it is being constructed from in
message.
2. Yes the only change i have done to the trunk code is instead of 
    SessionID messageSessionID = MessageUtils.getReverseSessionID(exchange.getIn().getBody(quickfix.Message.class));
   I have used is the already created session which is set as part of header, for which the
code change is
    SessionID messageSessionID = exchange.getIn().getHeader("SessionID",SessionID.class);
 This helps me pick up the same session from which the request had come in. 
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 found as part of the header.

I will modify my description to reflect "in message" instead of "out message" for tracking
purposes. I am also trying to think would there be a scenario wherein the already written
code would hold good then perhaps we might have to toggle the SessionID creation based on
some property/switch.

Thank you!
 
                
> 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 scenario.
> We have a FIX message coming in to the Quickfix/J engine i.e. logon request with only
the senderID and TargetID populated and the engine successfully processes the logon request
based on the configuration. The subsequent requests for Single Order (Tag # 35 = D) the message
received contains the optional values SenderSubID and TargetSubID populated, the message is
picked 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. IllegalStateException : Unknown Session...
I looked into the code https://svn.apache.org/repos/asf/camel/trunk/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjConsumer.java
and found the issue. The session ID is being reconstructed from the out value being set into
the exchange object which as per API used would construct the session containing SenderID,SenderSubID,TargetID
and TargetSubID which is getting compared to 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
the null value the code ends up throwing the IllegalStateException. Looking at the QuickFixJConsumer
code i do understand the importance of reconstructing the SessionID object from the Message
set as Out in Exchange but from what i read about various client implementations on using
FIX the above scenario mentioned also holds good. For now I have gone ahead and patched the
QuickFixJConsumer code for my project by picking up the session id set in Exchange object
rather than recreating it using the MessageUtils. But i feel in a longer run a elegant solution
has to be put in place rather than user of camel patching the code up for their use:) 
> In case you need any further details do let me know.. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message