For Context Broker of kind "internal" and protocol "ngsi" it's possible to define an uri callback that is called automatically wherever some new data are published to the Context Broker. The uri is called Url Orion Callback and is avaialable on the tab Subscription whenever a context broker is created/edite
The payload sent to orion context broker is:
curl -v <ip_orion_broker>:<port_orion_broker>/v2/subscriptions -s -S --header 'Content-Type: application/json' -d @- <<EOF
"description": "<Name of the context broker>",
"url": "<Url Orion Callback>"
The subscription_id is later on saved and shown to the user.
HTTP/1.1 201 Created
Date: Wed, 25 May 2016 11:05:35 GMT
whenever the subscription failed, a special value is insert "FAILED" --> The automatic subscription failed (anyway the context broker is registered even if the subscripion failed)
whenever the subscription is null, means the automatic subscription is not available --> The automatic subscription is disabled
whenever the user change the <Url Orion Callback> or the <ip_orion_broker> or the <port_orion_broker>, the old subscription is removed and a new one is submitted
whenever the user delete the context broker, the subscription is removed