- PDP would implement the pub-sub for policies per each component
- maintain the database of subscribers with the
- list of generic policy-filters (==resource from the request json to /decision/v1 API) and the
- subscriber_topic for Message Router of DMaaP that uniquely identifies the component instance like “policies_DCAE_tca_<service-component-name>”
- on policy-update/add/remove, the PDP would iterate through the subscribers and do its matching to any of the policy-filters on each subscriber the same way as /decision/v1 does
- if policy-update/add/remove matches any of the policy-filters, PDP would push the policy-update notification that contains the whole policy-body of each added/updated policy and policy-id of each removed policy to Message Router of DMaaP with the topic that uniquely identifies the component instance like “policies_DCAE_tca_<service-component-name>”
- there might be a need for some logic to identify the stale subscriptions by checking with the Message Router of DMaaP on the timestamps of the latest delivered/undelivered message per ach topic PDP has the subscription on
- maintain the database of subscribers with the
- Message Router of DMaaP will do the following
- persistently (up to 7 days) deliver all the policy-update notifications per topic
- component will listen for the topic of the policy-update notification from MR of DMaaP with long-collect-polling time like 15 seconds to grab the push notification
- Component instance would do the following
- on startup – subscribe to PDP with the policy-filter the component is interested in and the DMaaP topic that would uniquely identify the component instance like “policies_DCAE_tca_<service-component-name>”
- listen for topic “policies_DCAE_tca_<service-component-name>” of policy-update notification from MR of DMaaP with long-collect-polling time like 15 seconds to grab the push notification
- on receiving the policy-update pushed notification from DMaaP, handle the policy-update that contains the whole policy-body of each added/updated policy and policy-id of each removed policy
- on stop, unsubscribe from PDP
Page Comparison
General
Content
Integrations