Hi there,

I set up a subscription with https://pubsubhubbub.appspot.com/ and
successfully confirmed it asynchronously.  After that, however, the hub
didn't seem to be pulling content from the topic URL or pushing it to the
subscriber.  Further testing showed that sync subscriptions always work, but
async subscriptions never work.

So I tried setting up my own hub using the source code at r402, and traced
what happened.

It looks like, in order for a hub ping to result in a check for new content,
a KnownFeedIdentity entity must exist for the topic URL (see main.py line
2258, in PublishHandlerBase.receive_publish).  The KnownFeedIdentity is
created by the RecordFeedHandler (main.py line 3034, in
RecordFeedHandler.post), which is triggered by KnownFeed.record (main.py
line 1980, in confirm_subscription).

confirm_subscription() only records the new topic if its record_topic flag
is set to True.  This flag is True for sync subscriptions (line 2071 in
SubscribeHandler.post) but False for async subscriptions (line 2119 in
SubscriptionConfirmHandler.post).

Sure enough, if I change False to True on line 2122, then async
subscriptions work.  So, is this a bug?  It's clearly intentional that
record_topic was set to False, but why is that?

Thanks for any insight on this,


—Ping

Reply via email to