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

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



Thanks for your help.

After some investigation this morning, this is what I have discovered:

Your helloWord pub/sub tests using XPath did, in fact, receive that erase
events, as you said they would.

My messaging wrapper class was not properly retrieving the callback object
because of a change in the way unpublish (i.e. 'erase') events are now
processed.  In the past (XMLBlaster v.9.0) an erase event would have the
same subscriptionId as a publish event.  In otherwords, if I called
updateQos.getSubscriptionId() in my update method, the subscriptionId would
be the same.

This has now changed.   The subscriptionId is still what I would expect
when I receive an asynchronous publish event.  However, now, when I receive
an erase event, the subscriptionId is "__subId:PtP".  I have changed my
messaging wrapper class to properly handle erase events now that I know
this.

Thanks again,
Andrew



                                                                                                                        
                      Marcel Ruff                                                                                       
                      <mr at marcelruff.info>               To:       xmlblaster at server.xmlBlaster.org                     
                      Sent by:                           cc:                                                            
                      owner-xmlblaster at server.xml        Fax to:                                                        
                      Blaster.org                        Subject:  Re: [xmlblaster] how do i get erase notifications    
                                                          from xpath subscriptions now?                                 
                                                                                                                        
                      09/24/2004 02:21 PM                                                                               
                      Please respond to                                                                                 
                      xmlblaster                                                                                        
                                                                                                                        
                                                                                                                        




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