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

Re: [xmlblaster] how do i get erase notifications from xpath subscriptions now?



Andrew.Yinger at Altarum.org wrote:
I just tried updating from cvs, rebuilding, and I still do not receive
erase notifications from XPATH subscriptions.

I placed the entire build on my server and restarted.  On my clients, I
copied over the updated xmlBlaster.jar file.  I also added a call to
'subQos.setWantNotify(true);' for my SubscribeQos.  Is there something else
I'm missing here?

Thanks,
Andrew

Strange, try this:


Start:

  java org.xmlBlaster.Main -wipeOutJdbcDB true


Start and type one time enter to subscribe:

  java javaclients.HelloWorldSubscribe -xpath "//key[ at oid='Hello']"


Start and type three times enter to publish and erase:

  java javaclients.HelloWorldPublish


The subscriber should get the events. Check your build time by typing 'd' in the server console (at the beginning of the xml dump).

regards,

Marcel




Andrew.Yinger at Altarum.org wrote:

In the latest change log it states:

o Bugfix for sending ERASE events in UNREFERENCED topics with XPath
subscription
  Topics delivered by XPATH subscriptions don't send erase notifications
  when they disappear as they match again if the[y] appear again

So, how do I get erase notifications if I subscribe with XPath query now?


The XPath erase notfication had a bug in 0.91.
As it was not too simple to fix it, we decided to remove the
erase event for XPath:

1. If a topic is explicitely erase()d all EXACT subscription
    are lost. Therefore all EXACT subscribers have stale subscriptions
    and we considered a notification essential.
    This old behaviour is still functional in 0.91

2. XPath subscriptions automatically match again if a topic
    was erased and later was re-created. So the XPath subscriber
    has no harm.
    That was the reason we considered it not essential and did
    dare to remove it.

Other clients may be interested in topics how the come an go,
but such events are currently not fired (see the similar '__sys__Login'
and '__sys__Logout' events on which you can subscribe).

I have now reimplemented the 2. from above, if you update
xmlBlaster from cvs the XPath notifications are here again.

A subscriber can set <notify>true/false</notify> as in previous releases
so every subscription can control the events it gets (defaults to true).

Summary: xmlBlaster from current cvs behaves same again as it did before
0.91
(but the bug is fixed)

Regards

Marcel



Thanks,
Andrew






-- http://www.xmlBlaster.org








--
http://www.xmlBlaster.org