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

RE: [xmlblaster] Initial updates question



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: owner-xmlblaster at server.xmlBlaster.org
[mailto:owner-xmlblaster at server.xmlBlaster.org] On Behalf Of Michele
Laghi
Sent: Wednesday, November 12, 2003 4:19 PM
To: xmlblaster at server.xmlblaster.org
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:laghi at swissinfo.org
tel. +46 8 7492952 / mob. +46 70 4103964
http://eclettic.tripod.com
http://www.xmlBlaster.org