Hi

Yeah sure we love contributions
http://camel.apache.org/contributing.html

On Tue, Feb 3, 2015 at 10:42 PM, jechavez <[email protected]> wrote:
> Hi Camel Community,
>
> I am seeing the following issue with the camel-quickfix component. I am
> sending a response FIX message back to a session defined in my quickfix.ini
> file. The session is defined as follows(some details ommitted for security
> reasons):
>
>     [DEFAULT]
>     ConnectionType=acceptor
>     BeginString=FIX.4.4
>     SenderCompID=EXCHANGE
>
>     [SESSION]
>     TargetCompID=CLIENT
>
> All other connection parameters are default.
>
> The return message is like so:
>
>
> 8=FIX.4.4|9=252|35=W|34=32|49=EXCHANGE|52=20150203-20:49:19.443|56=CLIENT|57=trader|262=MDRQ0003|55=EURO
> OPTION (LN) J15 4.75 EURO OPTION (LN) V15 5
> CS|107=S.CS::LN:J15:C:4.75:1.0:20150326::LN:V15:C:5.00:-1.0:20150925|460=NATG|167=MLEG|762=CS|268=1|269=2|270=0.15|277=F|10=198
>
> In the message, I have 49(SenderCompID)=EXCHANGE, 56(TargetCompID)=CLIENT,
> and 57(TargetSubID)=trader.
> So I would expect the message to be sent to the above session. However I get
> the following:
>
> 2015-01-28 13:26:12.537 DEBUG [Camel (fixgateway) thread #1 -
> JmsConsumer[FIX.EXCHANGE.CLIENT.OUT]]
> (org.apache.camel.processor.Pipeline:76) Message exchange has failed: so
> breaking out of pipeline for exchange: Exchange[JmsMessage[JmsMessageID:
> ID:25822_f_1422473172571_f_37]] Exception: java.lang.IllegalStateException:
> Unknown session: FIX.4.4:EXCHANGE->CLIENT/trader
>
> In the code, I see under QuickfixjProducer.java, that the SessionID is taken
> from
>
>     getEndpoint().getSessionID();
>
> and if not found there, then it is obtained by looking up
>
>     MessageUtils.getSessionID(message);
>
> The problem occurs in my situation above, where I have defined the session
> just at the CompID level. I actually have several session defined in my
> config file:
>
>     [SESSION]
>     TargetCompID=CLIENT2
>
>     [SESSION]
>     TargetCompID=CLIENT3
>
> So the first method of getting the SessionID will not work, since the
> endpoint has multiple sessions. Then when the code uses MessageUtils, it
> creates a SessionID from the message, which it will interpret as a specific
> session to 57=trader.
>
> Instead of looking up session FIX.4.4:EXCHANGE->CLIENT, it will attempt to
> lookup FIX.4.4:EXCHANGE->CLIENT/trader, which does not exist!
>
> I propose making a code change to lookup the session based on the SessionID
> header value (SessionID=FIX.4.4:EXCHANGE->CLIENT). This would allow the end
> user to specify which session to send the message to, without relying on the
> config file or the message itself.
>
> If it is OK, I would like to open a JIRA and submit a pull request in
> Github.
>
>
> Thank you,
>
> Jose E. Chavez
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Unable-to-send-message-in-camel-quickfix-component-cannot-find-session-tp5762367.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [email protected]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Reply via email to