...Hi,
I've recently started to experiment with xmlBlaster using the Perl
2) Are the subscriptions persistent if the server and/or agent shuts down?
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
http://www.xmlblaster.org/xmlBlaster/doc/requirements/interface.subscribe.html
You may want to set in your subscribe QoS:
<qos> <!-- Recoverable subscription after server crash / restart --> <persistent/> <!-- Ignore a second subscribe on same oid or XPATH (default: true) --> <multiSubscribe>false</multiSubscribe> <!-- don't send an initial message after subscribe (default: true) --> <initialUpdate>false</initialUpdate> </qos>
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:
<qos>
<securityService type="htpasswd" version="1.0">
<![CDATA[
<user>joe</user>
<passwd>secret</passwd>
]]>
</securityService> <session name='joe/3' timeout='86400000' maxSessions='10'
clearSessions='false' reconnectSameClientOnly='false'/><!-- Recoverable session after server crash / restart --> <persistent/>
<!-- Configure the server side callback queue (one for each login session) -->
<queue relating='callback' maxEntries='1000' maxBytes='4000000'
onOverflow='deadMessage'>
<callback type='XMLRPC' sessionId='4e56890ghdFzj0' pingInterval='10000'
retries='-1' delay='10000' oneway='false' dispatchPlugin='undef'>
http://192.168.1.4:8081/
<burstMode collectTime='400' maxEntries='20' maxBytes='-1L' />
</callback>
</queue></qos>
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
regards
Marcel
-- http://www.xmlBlaster.org