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

Re: [xmlblaster-devel] subscription questions

Hi Ross,

Ross Jekel wrote:
Two problems:

1) newestFirst for me doesn't seem to work using an xml-rpc interface
from Python. I'm trying this:

The newestFirst is currently not implemented. It will always return the newest first. I will look deeper into this on how to solve this.

    # Subscribe to the subscription channel
    blaster.subscribe("<key oid='respository.subscription'/>",
            <subscribe id='_subId:slemail_2'/>
            <history newestFirst='false' numEntries='-1'/>

on a topic configured like this:

    # Publish an administrative command to configure the topic
    blaster.publish(xmlKey, "",
        <!-- Configure the topic on first publish -->
        <topic readonly='false'><msgDistributor
            <persistence relating='msgUnitStore' maxEntries='1000'
            <queue relating='history' type='CACHE' version='1.0'
maxEntries='1000' maxBytes='1048576'/>

and the historical messages are always listed in newestFirst order.

2) unSubscribe is supposed to take the subscriptionId that was returned
by subscribe.

Here both alternatives are supported, i.e. you can pass either the oid of the topic or the subscription Id. Here however I noticed you did the mistake of using the wrong syntax for the subscriptionId:

you used


but it should be

__subId:slemail_2 (starts with a double underscore).

You can verify this by checking what is returned when subscribing.

The documentation here
http://www.xmlblaster.org/xmlBlaster/doc/requirements/interface.unSubscribe.html states:

xmlKeystring The XML encoded key containing the subscriptionId

Whenever I unSubscribe using the subscriptionId for the above
subscription I get an error:

[Jun 10, 2005 2:29:26 PM WARN  Thread-5
RequestBroker-/node/xmlBlaster_127_0_0_2_3412] UnSubscribe on unknown
topic [_subId:slemail_2] is ignored

But if I unsubscribe using the topic key it works fine.

Am I right to use the topic key or is the documentation right and I'm
doing something else wrong?


Regards Michele