You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by yogu13 <yo...@synechron.com> on 2013/01/16 10:32:45 UTC

Camel-QuickFix Component issue

Hi,

I am using Camel version 2.10.3 , QuickFix/J version 1.5 on JDK 1.6.x, 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 doesnt
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:) Also i m not sure if there is any alternative solution
available .. please suggest the way ahead.

In case you need any further details do let me know..

Thanks in advance ...

Cheers!
-Yogesh 



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-QuickFix-Component-issue-tp5725622.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel-QuickFix Component issue

Posted by Christian Müller <ch...@gmail.com>.
I will have a look at it when I find some time for it.
Busy days...

Best,
Christian

On Thu, Jan 17, 2013 at 11:48 AM, yogu13 <yo...@synechron.com> wrote:

> Have created a JIRA Issues for this and details can be found @
> https://issues.apache.org/jira/browse/CAMEL-5979
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-QuickFix-Component-issue-tp5725622p5725683.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--

Re: Camel-QuickFix Component issue

Posted by yogu13 <yo...@synechron.com>.
Have created a JIRA Issues for this and details can be found @
https://issues.apache.org/jira/browse/CAMEL-5979



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-QuickFix-Component-issue-tp5725622p5725683.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel-QuickFix Component issue

Posted by yogu13 <yo...@synechron.com>.
Hello Christian,

Thank you for the quick reply... As my post mentioned sadly the fix i made
is specific for my client's scenario and wouldnt be ideal solution to
contribute . However having said this, i do understand the code which is
currently written by the camel team to be applicable to other different
scenarios which the camel-quickfix components might run into. All in all i
am not sure if any elegant solution exists to handle both the code versions
at the camel-quickfix end.

Please let me know how can i take this ahead with camel team.

Thanks in advance...

Cheers!
-Yogesh




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-QuickFix-Component-issue-tp5725622p5725638.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel-QuickFix Component issue

Posted by Christian Müller <ch...@gmail.com>.
Hello Yogesh!

Do you consider to create a JIRA and attach a patch with an unit test? We
love contribution.

Best,
Christian
Am 16.01.2013 10:37 schrieb "yogu13" <yo...@synechron.com>:

> Hi,
>
> I am using Camel version 2.10.3 , QuickFix/J version 1.5 on JDK 1.6.x, 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 doesnt
> 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:) Also i m not sure if there is any alternative solution
> available .. please suggest the way ahead.
>
> In case you need any further details do let me know..
>
> Thanks in advance ...
>
> Cheers!
> -Yogesh
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-QuickFix-Component-issue-tp5725622.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>