Dispatchers Service
Whereas the Event Service is in charge of communicating the occurrence of specific types of events, the Dispatcher Service gives you the ability to act on them. Learn how to configure dispatchers.
Example use case
When a User object is removed in the User Service, the customer must guarantee that all personally identifiable information of the user disappears from all services. A dispatcher for the user_deleted
Event type must therefore create a Task which eliminates the PII in, for example, the Data Service.
Create your first dispatcher
Dispatching an action based on an event is easy. First you need to choose the action type. The dispatcher service currently supports two types of actions (a mail and task action).
The Task Action contains the (optional) parameters for the Create a Task request to the Task Service:
name
: The unique name of the Action. - (optional)description
: A brief description for the Action. - (optional)functionName
: The name of the Task Service Function to invoke.data
: The key-value pairs the Task Service Function expects as input. - (optional)starTimestamp
: The moment at which the Task is to be executed. If no time is specified, the Task will be immediately performed. - (optional)tags
: Descriptive keywords that are stored in the Task object. - (optional)
The dispatcher service will append the original event data as a property called event and pass it to the task service. Setting the event property yourself will be overridden.
Events can originate from any service and the dispatcher service will put listeners based on the dispatchers configured.
List Dispatchers
In order to list dispatchers a user is required to have the VIEW_DISPATCHERS
permission.
Update a Dispatcher
In order to update a Dispatcher a user is required to have the UPDATE_DISPATCHERS
permission.
Dispatcher Properties
eventType
The type of event the Dispatcher will respond to e.g user_deleted
name
The unique name of the Dispatcher - (Optional)
description
A brief description for the Dispatcher - (Optional)
actions
The actions the Dispatcher shall execute
tags
A list of string identifiers that can be attached to a Dispatcher
When managing Dispatchers using the CLI EXH_CLI_MANAGED
will be appended to the tags array
Last updated