Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-5979

Camel-Quickfix dynamic SenderSubId/TargetSubId issue


    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.10.3
    • Fix Version/s: 2.9.7, 2.10.5, 2.11.0
    • Component/s: camel-quickfix
    • Labels:
    • Environment:

      QuickFix/J version 1.5 on JDK 1.6.x

    • Estimated Complexity:


      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 in 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..




            • Assignee:
              muellerc Christian Müller
              yogu13 Yogesh Rao
            • Votes:
              0 Vote for this issue
              3 Start watching this issue


              • Created: