Interface implemented by classes that wish to listen to subscription events.
Methods
on Data Update(subject, data, metadata)
Called when an update is received for the subscribed record.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
subject |
String | The subject of the record that the update is for. |
||||||||||||
data |
Map | The updated data. |
||||||||||||
metadata |
Map |
Meta data for the update. Properties
|
on Error(subject, error Type)
Called when there is an error with the subscription.
Parameters:
Name | Type | Description |
---|---|---|
subject |
String | The subject of the record that had an error. |
errorType |
module:ct-services |
The type of error. |
on Status Update(subject, status)
Called when the status of the subscription changes.
Parameters:
Name | Type | Description |
---|---|---|
subject |
String | The subject of the record that changed status. |
status |
module:ct-services |
The new status of the subscription. |