Lucie,

The hub has to initiate the refresh, but you may do it also.

Section 6.3 of the spec:
"Before a subscription expires (i.e., before hub.lease_seconds
elapses), Hubs MUST recheck with subscribers to see if a continued
subscription is desired. Hubs do this by sending the subscriber a
verification request with hub.mode equal to subscribe."

Section 6.1
"Hubs MUST allow subscribers to re-request subscriptions that are
already activate. Each subsequent request to a hub to subscribe or
unsubscribe MUST override the previous subscription state for a
specific topic URL and callback URL combination once the action is
verified."

So all of the hubs are behaving according to the spec. The appspot one
should send you a verification request every 5 days. It won't give you
a subscription longer than 10 days because its policies are to not
respect values bigger than that. If you send another subscription
request after 9 days, you'll get another 10 days. If you don't, the
hub should send you a verification request just before the 10 days are
up.  And it sounds like the pushpress hubs' policy is not respect the
lease_seconds value at all.

In any case, if your subscriber follows the spec, everything will work
fine. The easiest thing is to not worry about refreshing the
subscription, since the hub should do that. If you want to make your
subscriber extra robust, then set a timer to go off sometime before
the lease_seconds in the verification request from the hub, and send a
new subscription request then.


On Jul 7, 5:12 am, Lucie <[email protected]> wrote:
> I have a question about the lease_seconds parameter ... it seems the
> behaviour at different hubs is quite different.
>
> The PubSubHubbub specification says: "Number of seconds for which the
> subscriber would like to have the subscription active. If not present
> or an empty value, the subscription will be permanent (or active until
> automatic refreshing removes the subscription). Hubs MAY choose to
> respect this value or not, depending on their own policies."
>
> With the appspot hub, if I leave the value as null, the hub decides on
> a length of 5 days. Does that mean that the subscription will expire
> after 5 days unless I subscribe again, or will the hub send me a re-
> verification request every five days?
> Also, it seems the appspot hub will not allow me to specify
> lease_seconds to be bigger than 10 days -- anything bigger & I get a
> reply back with 10 days. So again my question is -- who will initiate
> the refreshing -- me or the hub?
>
> With pushpress hubs, I always get a subscription length of 10 years,
> regardless of what I specify in my request.

Reply via email to