SXAPI Core : notification component
The notification component is a core component used for notifying the application events.
This component comes with 2 storage backend (sqs or couchbase)
to persist notification context.
Configuration
To enable this component in you API, you must add a notification
property
in the main section of your configuration file,
The coresponding value should be an object with configuration parameters.
If notification
property is not defined, or set to false ("notification" : false
), no
notification context will be defined and your API will be muted and no notification will be persisted.
Config parameters
Param | Mandatory | Type | default | Description |
---|---|---|---|---|
pipeline-id | yes | object | a string key with the notification pipeline ID | |
pipeline-id.type | yes | string | the type of notification backend. could be sqs or couchbase | |
pipeline-id.resource | yes | string | the resource identifier for this pipeline |
Config Sample
notification:
pipeline-id:
type: sqs
resource: sqs-api
Endpoints parameters
Param | Mandatory | Type | default | Description |
---|---|---|---|---|
notification | yes | object | an object with at least the 2 following properties | |
notification.pipeline | yes | string | the notification pipeline ID | |
notification.event | yes | string | the event name signature |
Config Sample
notification:
pipeline: pipeline-id
event: event:action