[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xmlblaster] Publish/Topic clobbering with multiple clients ( found my problem)
sorry having kept you waiting for so long.
Madere, Colin wrote:
Yes that is the expected behaviour. When a client makes an erase on a
topic (an oid), all subscriptions (the own subscriptions but also these
done by other clients) are removed too.
The problem was appearing when a client is disconnected and reconnected w/o
restarting xmlBlaster. It seems to be that I was (incorrectly) erasing the
key upon client shutdown:
(I don't really understand what the comment here is saying. What is meant
by "it", the oid? )
// only erase since we don't check if it exists on init
EraseKey ek = new EraseKey(glob, oid);
EraseQos eq = new EraseQos(glob);
EraseReturnQos eraseArr = con.erase(ek.toXml(), eq.toXml());
The behavior I noticed when this was run on one client with another still
connected and subscribed was:
If my client runs the erase code above and re-connects doing all it's init
code, it will receive updates on the topic but when it publishes, the other
client(s) which remained connected no longer receives it's updates.
Is this the expected behavior in this scenario? Just trying to further my
So when your client reconnects and starts publishing again, the second
client has no subscription on that topic anymore.
If you don't want that behaviour you should not do an erase on the
topic. If this is wanted for some reason, there is an alternative: when
an erase is done, all the subscribers to that topic get an 'erase'
update. So these clients getting an erase event could then resubscribe
to the topic.