1

I have subscribed to 10 RSS via pubsubhubbub all the links are of different category i.e Technology, Politics etc

whenever the I get push notification pubsubhubbub is it possible to know from which RSS the news is been published so I can save it accordingly at my end under the particular category.

Ironman
  • 173
  • 1
  • 3
  • 10

1 Answers1

2

The trick is to use a different callback for each subscription. So, let's say you've subscribed to feed1 and feed2, your subscriptions' hub.callback could then be, respectively: http://domain.tld/push/feed1, and http://domain.tld/push/feed2. You can immediately know which feed has been notified on each callback! Check the "Tools and Good practice" section on this blog post.

Later, you should think about using different callbacks for every feed. It simplifies debugging and handling of notifications by letting you immediately know which feed is linked to which notification. It’s often as easy as adding a query string like ?feed=key at the end of a generic webhook.

You could also very well use callbacks like http://domain.tld/push/catX/feed1 where catX is the category of the feed.

Julien Genestoux
  • 31,046
  • 20
  • 66
  • 93