Skip to main content

Product: OpenFusion Notification Service

Version: ALL

 

Description:

Why use Custom Filters?

 

Resolution:

Filters are a means to reduce the number of events received by a consumer to only those that are of interest.

For example, if a consumer has connected to an event channel that is forwarding alarm events, the consumer will receive every event that is published to the event channel unless it uses a filter to remove the unwanted events.

The filter contains a constraint, which must be evaluated to TRUE for the event to be forwarded to the consumer.

In the example of alarm events, the filter could be 'severity > 4'. This would filter out all events that have a severity property of 4 or less, leaving only the most severe alarm event messages to be forwarded to the consumer.

Filters rely upon properties in structured events for filtering. The format of a structured event is as follows.

The Event header contains a fixed header and a variable header.

The fixed header holds information identifying the particular event and includes:

  • event domain (domain_name) - the domain of a particalar vertical industry where the event type is defined
  • event type (type_name) - the type of the particular event within the domain
  • event name (event_name) - a unique name for the particular event instance being transmitted

The variable header contains QoS property settings for a specific event. These settings consist of a series of zero or more name value pairs.

The name component of the pair is a string variable which identifies a particular QoS property; the value component is an Any which contains the value of the QoS property.

The Event Body contains a filterable body and a remaining body.

The filterable body contains a sequence of zero or more name-value pairs. These pairs are used for filtering the event. Each name value pair consists of the name of a property (a string variable) and its value (an Any)

The remaining body (remainder_of_body) contains the actual event data, which is an any.

You can also filter events by advertising subscription types. This is like a primitive filter that only applies to the domain name and type name in the fixed header of structured events.


#KnowledgeDocs
#OpenFusion