Hi David, yes that is exaclty what you get.
You must use the same session name and you also must set expicitly the number of retries on the callback side (default is no retries).
To check it out you can try the HelloWorldPublish + HelloWorldSubscribe Demos:
term1: java org.xmlBlaster.Main
term2: java javaclients.HelloWorldSubscribe -session.name fritz/1 -dispatch/callback/retries 10000
(and press return to subscribe)
term3: java javaclients.HelloWorldPublish -session.name michele/1 -numPublish 1000 -sleep 1000 -interactive false
Then you do a CTR-C on term2 (to avoid unsubscribe) and start the subscriber again with the same invocation as before. Then you get the queued updates (you don't need to press the key to subscribe).
Saluti Michele
David Hooker wrote:
Let's see if I get this right.
Suppose I create a client, and give it a public session id, with a relative name as "MyClient/5". When I subscribe over this connection, with initial updates set to 'true', I'll only get those messages that were queued up for me while I was not connected?
Here's the scenario:
Client 1 comes up. Client 2 comes up. Client 1 pubs a message. Client 2 get's the message Client 2 goes down. Client 1 pubs another message. Client 2 comes up. -- Here I want Client 2 to get the initial update of only the second message, even though both messages from client 1 may be in the xmlBlaster server. --
So simply creating my connection with a unique pubSessionId (the same one each time, of course) will accomplish this?
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michele Laghi Sent: Wednesday, November 12, 2003 4:19 PM To: [EMAIL PROTECTED] Subject: Re: [xmlblaster] Initial updates question
Hi David, if I understood you right:
you can do that with:
the qos.setHistoryQos(...) in your SubscribeQos (you also need to configure the history queue to be large enough). You must however be able to find out yourself when the client crashed.
Even better I think is to set your connection to failsafe (see client.failsafe requirement). When your client is gone, the callback server will poll until he is reconnected again storing the new messages in the callback queue. Once the client reconnects (he must reconnect with the same public positive sessionId) the callback queue content will
be dispatched to your client.
Finally, if what you really wanted was to get the initial update of a topic which has been created while you were gone, then I don't know a simple way of doing it.
Cheers Michele
David Hooker wrote:
Hi-
I want to subscribe to a topic and get only those messages which I haven't seen yet.
For instance, suppose my client dies, and someone publishes some messages on a topic. Let's say that the messages have a lifetime of 1 day.
Now, when my client comes up, I want him to get initial updates of
only
the new messages he hasn't seen yet.
How do I do this? Is there API support in xmlBlaster for this? If
not,
how can I implement this in my client?
Thanks.
-- Michele Laghi mailto:[EMAIL PROTECTED] tel. +46 8 7492952 / mob. +46 70 4103964 http://eclettic.tripod.com http://www.xmlBlaster.org
