IBM Cloud Docs
Event Notifications relationship model

Event Notifications relationship model

Event Notifications includes sources, filters, topics, destinations, and subscriptions. The relationship between these elements is shown in Figure 1.

Event Notifications flow
Figure 1. Event Notifications relationship model

Events originate outside Event Notifications, for example, from IBM Cloud services. An 'event source' within Event Notifications represents a connection between Event Notifications and one of these event-producing services.

Topics have associated filters that determine which source events are published. Topics can have multiple sources, each with their own filter. Topics isolate events of interest from various sources and aggregate them into one entity.

Subscriptions tie topics to destinations. While a single topic or destination can be associated with multiple subscriptions, a subscription is one-to-one, meaning it ties one topic to one destination. For service-to-human channels, one subscription can contain multiple recipients. For example, a subscription to an email destination is not restricted to just one email address but instead has a recipient list that might hold many addresses.

Event notification flow

When an event occurs in a registered source, the source sends an event notification to the Event Notifications service. Based on the filters or conditions that are defined on the source, this incoming notification is targeted to one or several topics. The notification is delivered to all destinations, which are subscribed to the targeted topics.

Event notification format

A notification sent to the Event Notifications service must conform to the CNCF CloudEvents format.

More about filters

A filter is a conditional statement, which connects a source to a topic. Filters are written to route notifications of interest to a particular topic. All notifications that pass through the filters into a topic are then routed to the topic subscribers. Filtering is absent between topic and destination.

To simplify filtering, a source might include event categories in their notifications. Event categories are standard filter keys with the following hierarchy: Event Category -> Event Type -> Severity. Event categories simplify filtering because they appear as dropdown selection boxes when you are creating topics and filters in the Event Notifications UI. For more advance filtering, use JSONPath in the Custom Filter field. For more on JSONPath, see JSONPath Online Evaluator.