I am trying to implement the PubSubHubbub Subscriber protocol with WordPress where each of the feed Atom entries will be saved into a Custom Post Type for the client and many of the XML fields saved into Custom Fields.
The problem that has been raised by the client and I am unsure of is: When the HTTP POST noitification from the Hub with new content comes in, the subscriber client (WordPress) will notify that it successfully received the notification and will only try to send the request again until the client sends a notification success message (http://pubsubhubbub.googlecode.com/svn/trunk/pubsubhubbub-core-0.4.html#contentdistribution).
However how would you go about handling this if for some reason the Script stopped in the middle? How could you make sure it got that feed again? Also because there could be like 50 articles posted consecutively.
Hope someone can help me with this.
EDIT:
Sorry I expressed myself not too well. I am mainly concerned about on how can someone be able to protect themselves against their script stopping in the middle of processing the XML in WordPress (maybe queueing in WordPress which I don’t know how to do, or save a temporary XML file and discarding at the end)?
First of all, PubSubHubbub is an open protocol. Even though it was initially designed for RSS/Atom feeds, it’s now completely agnostic. It also does not matter whether it’s with a WordPress feed or any type of RSS feed that supports it (Medium, Blogger… etc).
Now, upon notification, the subscriber should respond a 2XX status code:
As you can see, the hub may retry in case of failure. So, you have at least some margin for very emporary and sporadic problems… That said, you should make sure your script will not be stopped in the middle.