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

Re: [xmlblaster] xmlBlaster with perl questions

Kevin Priebe wrote:

I've recently started to experiment with xmlBlaster using the Perl
2) Are the subscriptions persistent if the server and/or agent shuts

Right now agents just subscribe when they start up and disconnect if
they are shutdown or killed (thus losing the subscription).  We want an
agent to get any missed events if it has to restart, but if it
resubscribes it gets 2 of the same message! (back to the 'need to check
if it is subscribed')

Please check


You may want to set in your subscribe QoS:

   <!-- Recoverable subscription after server crash / restart -->
   <!-- Ignore a second subscribe on same oid or XPATH (default: true) -->
   <!-- don't send an initial message after subscribe (default: true) -->

Furter you must make you client to connect in fail safe mode.
If you don't do it and the client disappears the server
will detect it when the callback ping fails.
Then the server will cleanup all resources of the lost client
to protect against resource leaks.

If you want the server to keep the subscription and the callback
queue of this client during client absence use following
ConnectQos with your client connect() call:


   <securityService type="htpasswd" version="1.0">

   <session name='joe/3' timeout='86400000' maxSessions='10'
               clearSessions='false' reconnectSameClientOnly='false'/>

   <!-- Recoverable session after server crash / restart -->

   <!-- Configure the server side callback queue (one for each login session) -->
   <queue relating='callback' maxEntries='1000' maxBytes='4000000'
      <callback type='XMLRPC' sessionId='4e56890ghdFzj0' pingInterval='10000'
          retries='-1' delay='10000' oneway='false' dispatchPlugin='undef'>
         <burstMode collectTime='400' maxEntries='20' maxBytes='-1L' />


Note the retries='-1' setting, xmlBlaster now polls for the absent client, with delay='10000' it tries every 10 sec again to reach the clients callback server. Now after one day the login session times out (timeout='86400000') because there is no activity, so you set this to '0' to last forever.

See http://www.xmlblaster.org/xmlBlaster/doc/requirements/interface.connect.html



-- http://www.xmlBlaster.org