-
Notifications
You must be signed in to change notification settings - Fork 3
The Subscriber
The Subscriber is an HTTP server that communicates with the hub to manage subscription requests to a topic and receives notifications from the hub.
The subscriber provides a REST API to receive a request for subscription to a topic. To subscribe to a topic, the subscriber needs a topic URL and the hub url as the body of an HTTP POST message. A curl example for a subscription request is shown below.
curl \
-X POST \
-H 'content-type: application/x-www-form-urlencoded' \
-d 'topic_url=http://resourcesync.org/resync/topic\
&hub_url=http://resourcesync_hub.org/subscribe' \
http://resourcesync_sub.org/subscriber
When the hub sends a verification challenge as described in PubSubHubbub specification, the subscriber will automatically respond to the verification challenge and complete the subscription process.
The subscriber receives notifications from the hub and performs basic checks to determine if it is a ResourceSync notification or PuSH notification.
The subscriber, at this stage, should be enhanced with functionality based on the received notification payload.
The following variables must be set in the [subscriber]
section of resourcesync_push.ini.
-
url
: [required] The complete HTTP URL of the subscriber itself. -
server_path
: [optional] If the publisher is setup using a proxy server, the proxy path must be specified here.