APS Events

In many cases, applications need to run certain operations on events related with particular resources or with any resources of specified types. For example, in a customer context, an anti-spam application may need to add each new domain to the list of protected domains and remove a domain from the list when it is removed from the customer context. Therefore, the corresponding application service must be notified about the events of adding and removing domains, that is events related with resources of a certain APS type.

Introduction

The APS controller implements the publisher-subscriber relationship between resources. In this model, a resource, event subscriber, wants to receive notifications of events related with publishers, which can be another resource or a set of resources of a certain APS type. Publishers are known as event sources in the event management system. Application services subscribe their resources to events by sending a REST request to the APS controller with the following parameters explicitly specified:

  • Event subscriber ID: the ID of the resource, for which the event subscription must be created.

  • Event type: as defined in the List of Types and other sections.

  • Event source: either the APS ID of a resource (single event source) or ID of an APS type (collection of event sources).

  • Handler: a service operation (function) that will process event notifications. The APS controller must send notifications in the form of REST requests addressed to the URL of the event handler.

Visibility Scope

To receive event notifications from an event publisher, the event subscriber must either share the same owner with the event publisher, or be linked directly with the event publisher.

Event Types

There are general and specialized event types as explained in this document:

  • General

    • Any APS resource or type can be an event source

    • Events are triggered by one of these activities: linked, unlinked, changed, removed, and available

  • Bind-to-domain

    • Only parent subscriptions can be event sources

    • An event is triggered when the parent subscription binds with a child domain registration subscription

  • Resource limit change

    • Only subscriptions can be event sources

    • Events are triggered when resource limits in subscriptions are changed

  • Subscription renewal

    • Only subscriptions can be event sources

    • An event is triggered when a subscription renewal order processing is started

You can practice development, deployment, and provisioning of a demo package by following the Event Processing demo project.