EWAI-SERVER MESSAGING
EWAI uses role-authenticated EW-Messaging channels for receiving IOT PTD messages. EWAI sets up one EW-Messaging channel per EWAI Instance, and it is created from (a munging of) the EWAI_INSTANCE_NAME setting in the config file.
For instance, if the EWAI Instance (marketplace) EWNS is energymarket1.apps.bigco.iam.ewc, then the messaging channel name will be energymarket1_apps_bigco_iam_ewc.
DERs sending messages to this EWAI Instance (and marketplace) send their messages to this one channel, and EWAI-LISTEN then subscribes to that messaging channel to forward the messages into the EWAI-SERVER database (after further validation).
There are some required EWAI header fields that must be in each PTD message sent by a DER so that EWAI can both validate and route the message to the correct EWAI asset within the EWAI Instance (marketplace).
Please see the EWAI-GEN docs for more information on how DERs compose and send messages into EWAI.
SETTING UP MESSAGING
At this time, you must download and install the EW-Messaging Repo on your own server.
You must also install NATS.io. EW-Messaging utilizes NATS for transport.
A hosted installation of EW-Messaging is forthcoming.
You must also setup EW-Switchboard roles to get messaging going on your server. See the step-by-step setup guide.
MESSAGE FORMATS
ROLE AUTHORIZATION
Before a message is accepted and stored into an asset dataset, it is role authorized. See switchboard doc for more info.