[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] Login/Logout event



Hi Xavier,

Hi,

I launch two Clients in "FailSafe" mode.
One of the clients subscribes to the "sys_login" queue with the option
"wantinitialupdate=true".


If, I stop XMLBLASTER and I relaunch it later. The two clients detect that
xmlblaster is down.
And they succeeded in being connected again to xmlblaster . GREAT!!!!!!

Unfortunately, the client which subscribed to the queue "sys_login", does
not always receive two messages
As I expected.


Below is the "dump state" of xmlblaster


<MapPlugin id='msgUnitStore:xmlBlaster/__sys__Login' type='RAM' version='1.0' numOfEntries='2' numOfBytes='445'> <persistence relating='msgUnitStore' maxMsg='100000000' maxMsgCache='10000'/> </MapPlugin> <RamQueuePlugin id='history:xmlBlaster/__sys__Login' type='RAM' version='1.0' numOfEntries='2' numOfBytes='72'> <queue relating='history' maxMsg='2' maxMsgCache='2'/> </RamQueuePlugin> <MsgUnitWrapper id='__sys__Login/2003-03-19 17:31:37.884000003' referenceCount='1' state='ALIVE'> <key oid='__sys__Login'/> <content><![CDATA[XRO-agent]]></content> <qos>

<sender>/node/xmlBlaster/client/__RequestBroker_internal[xmlBlaster]</sender


     <expiration lifeTime='-1'/>
     <rcvTimestamp nanos='1048091497884000003'/>
     <forceUpdate/>
    </qos>
  </MsgUnitWrapper>
  <MsgUnitWrapper id='__sys__Login/2003-03-19 17:31:37.884000003'
referenceCount='1' state='ALIVE'>
    <key oid='__sys__Login'/>
     <content><![CDATA[server]]></content>
    <qos>

<sender>/node/xmlBlaster/client/__RequestBroker_internal[xmlBlaster]</sender


     <expiration lifeTime='-1'/>
     <rcvTimestamp nanos='1048091497884000003'/>
     <forceUpdate/>
    </qos>
  </MsgUnitWrapper>


I noticed that the "history/maxMsg" of the queue sys_login is equal to 2.
How can I change it ?
How can I be sure that I will receive two messages from the queue
"Sys_login" ?


1. When a client reconnects and the SERVER WAS DOWN the subcribes are lost.
Currently we have no <persistent/> in ConnectQos for sessions and its subscribes.
So a client which gets the event of 'reConnected()' should run its initialize code
again as on startup to subscribe again.
If the server was not down the client has reconnected to the same session instance
and does not need to re-subscribe. The client can test this with:
if (connectReturnQos.isReconnected()) {
// avoid subscription
}



2. When a client subscribes it only gets the newest message of a topic.
If you want to query the history queue you need to use the history QoS, see
http://www.xmlblaster.org/xmlBlaster/doc/requirements/interface.subscribe.html



3. History maxMsg for internal messages like 'sys_login':
The maxMsg is currently hard coded to '2' (and will change to '1' sooner or later).
But you can query '__sys__UserList' to get a list of all known clients.
Use '__sys__Login' and '__sys__Logout' just as notifications about clients coming
and going.



4. Play with the many options of

java javaclients.HelloWorldPublish
and
java javaclients.HelloWorldSubscribe

to find out about the behaviour of the different QoS.

regards

Marcel


Thanks,

Xavier