RE: [Quickfix-developers] [qfj] Publishing Messages to JMS
Brought to you by:
orenmnero
|
From: Steve B. <st...@te...> - 2005-09-12 18:32:29
|
Hi Caleb,
OK, I understand. I was looking at the message
logging in the send() method rather than the state's set()
method. The Java code is implemented the same way so it should
have the same behavior.
However, there's another potential difference.
Is the Session::send() operation in C++ never expected to throw
an exception, even if the connection is down? It appears that
it's designed to return a boolean based on a low-level system
call return value. If so, then we'll need to slightly modify
the Java code to catch low-level socket-related exceptions and=20
return a boolean result value instead of propagating an exception.
Steve
________________________________________
From: Caleb Epstein [mailto:cal...@gm...]=20
Sent: Monday, September 12, 2005 12:45 PM
To: Steve Bate
Cc: qui...@li...
Subject: Re: [Quickfix-developers] [qfj] Publishing Messages to JMS
On 9/12/05, Steve Bate <st...@te...> wrote:
I'm looking at the C++ Session code as I see the following
fragment for non-admin messages:
m_application.toApp( message, m_sessionID );
message.toString( messageString );
if ( isLoggedOn() )
=A0=A0=A0=A0result =3D send( messageString );=20
}
It looks like the message is not passed to the send() method
if the session is not logged on. The send() method is where
the message is persisted. Am I interpreting this correctly?
No, the persistence is done in this same method, a little bit below what =
you
pasted.=A0 I was actually mistaken when I said it is done before the =
send (it
probably should be):
=A0=A0=A0 if ( !num =
)=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0 <--
num is !0 if we are resending
=A0=A0=A0 {
=A0=A0=A0=A0=A0 MsgSeqNum msgSeqNum;
=A0=A0=A0=A0=A0 header.getField( msgSeqNum );
=A0=A0=A0=A0=A0 m_state.set( msgSeqNum, messageString );=A0=A0 <-- =
persistence happens
here
=A0=A0=A0=A0=A0 m_state.incrNextSenderMsgSeqNum();
=A0=A0=A0 }
--=20
Caleb Epstein
caleb dot epstein at gmail dot com=20
|