Standard message config for In Out topics: Difference between revisions
Jump to navigation
Jump to search
(Created page with "= Overview = All messages sent to MsgOut SNS queue for a service must hardcode its configuration, this is used by the Service - Message Config Manager|Message Config Manage...") |
No edit summary |
||
Line 1: | Line 1: | ||
= Overview = | = Overview = | ||
All messages sent to MsgOut SNS | All messages sent to MsgIn or MsgOut SNS queues have a hardcoded configuration, this is used by the [[Service - Message Config Manager|Message Config Manager]] service which stores every MsgCfg for every service in the project, which can then be used for example by client that sets up user notifications, or [[Service - Activity Switchboard|Activity Switchboard]] service. | ||
= | This configuration can also be used to validate messages being sent are formatted correctly. | ||
= MsgCfg syntax = | |||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> | ||
Line 21: | Line 23: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
= Location of | = Location of MsgCfg file = | ||
... | ... |
Revision as of 02:24, 8 November 2020
Overview
All messages sent to MsgIn or MsgOut SNS queues have a hardcoded configuration, this is used by the Message Config Manager service which stores every MsgCfg for every service in the project, which can then be used for example by client that sets up user notifications, or Activity Switchboard service.
This configuration can also be used to validate messages being sent are formatted correctly.
MsgCfg syntax
{msgTag}: {
properties:{
{propertyName}:{
required: true|false, //default: true
stringified: true|false, //default: false
isObject: true|false, //default: false, if is an object will look for child properties
properties: // if is set to isObject: true, nest levels using properties
activityTrigger: true|false, //default: false, whether can be used as a trigger in [[Service - Activity Switchboard|Activity Switchboard]] service
},
..
}
allowAdditionalProperties: true|false, //default: true, if false only the specified properties are allowed
}
Location of MsgCfg file
...
Validation of outgoing messages
- Can add to middleware function/s for validating and sending messages to the MsgOut SNS queue for the current service