> For the complete documentation index, see [llms.txt](https://docs-launchpad.energyweb.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-launchpad.energyweb.org/energy-solutions/digital-spine-by-energy-web/component-guides/ddhub-client-gateway/technical-guide/messaging.md).

# Messaging

## Overview

The Client Gateway supports the transmission and reception of messages and large files. Alternatively, participants can exchange messages through the Message Box when the `Message Forms` option is enabled. In this case, users can leverage a dynamically generated form, automatically populated based on the structure defined in the uploaded JSON schema.

***

## User Guide

### Pre-requisites

* Authorization to Client Gateway
* Subcribe/publish channels
* Topics

### Simple Messaging

A message can be sent by uploading a JSON file that defines the desired channel and topic in Data Messaging File Upload and vice versa.

#### Send a Message

1. Navigate to `Data Messaging`  > `File Upload`. Choose channel name, topic and version before uploading a json file that matches the selected topic schema. Click `Save` to send the message

<figure><img src="/files/pXOEbHO8IfasqIkUEG94" alt=""><figcaption><p>Send message</p></figcaption></figure>

2. Success message will be shown, click `Close` to close modal or `View recipients` to see the recipient list and delivery status

<figure><img src="/files/hKWAsCJ2Dv21txlSSXlF" alt="" width="375"><figcaption><p>Successfully send message</p></figcaption></figure>

<figure><img src="/files/nT9nf7Iw6jk8B8SDkW4U" alt=""><figcaption><p>Recipient list</p></figcaption></figure>

#### Receive a Message

1. Navigate to `Data Messaging`  > `File Download` and choose a channel by clicking on it

<figure><img src="/files/b50cA7AssKLiPDA1We4F" alt=""><figcaption><p>File download subscribe channel list</p></figcaption></figure>

2. You will be redirected to topic list page, click on a topic to proceed

<figure><img src="/files/bTzkmhNbFsKiU2oB1XmL" alt=""><figcaption><p>File download topic list</p></figcaption></figure>

3. The message will be displayed, click on `View details` to see message content

<figure><img src="/files/czHxTcLNWR3c4vzvL26y" alt=""><figcaption><p>Received message</p></figcaption></figure>

4. Click `Download` to save the message as JSON file&#x20;

<figure><img src="/files/iqUL3gfvOAbkwnX8Bv54" alt="" width="375"><figcaption><p>Message preview</p></figcaption></figure>

### Large Data Messaging

Schema types such as XML, TSV and CSV are classified as large data types and are being handled under Large Data Messaging within the Client Gateway.

#### Uploading a File

1. Navigate to `Large Data Messaging`  > `File Upload`. Choose channel name, topic and version before uploading a file that matches the selected topic schema. Click `Save` to send the message

<figure><img src="/files/kcDkol02jeeo0hrarzTW" alt=""><figcaption><p>Send large data file</p></figcaption></figure>

2. Success message will be shown, click `Close` to close modal or `View recipients` to see the recipient list and delivery status

<figure><img src="/files/UTrlxRq5jRj5uQRusQ0T" alt="" width="375"><figcaption><p>Successfully sent a message</p></figcaption></figure>

<figure><img src="/files/E7C0ZX55Vf9zjadB1Uq3" alt=""><figcaption><p>Recipient list</p></figcaption></figure>

#### Downloading a File

1. Navigate to `Large Data Messaging`  > `File Download` and choose a channel by clicking on it

<figure><img src="/files/yHTAvUQWr6fbbrplVXLa" alt=""><figcaption><p>Large Data Messaging subscribe channels</p></figcaption></figure>

2. You will be redirected to topic list page, click on a topic to proceed

<figure><img src="/files/jw0IOepdROJIr0pStQ2I" alt=""><figcaption><p>Large Data Messaging topics</p></figcaption></figure>

3. The message will be displayed, click on download button to download the received file

<figure><img src="/files/KTifKiVXtfBmYAShPpfA" alt=""><figcaption><p>Received large data message</p></figcaption></figure>

### Messaging UI

An alternative method for sending and receiving messages is through the Messaging UI. Instead of uploading a JSON file containing the message content, users can use the dynamic form to complete required and optional fields as defined by the selected topic's schema.

#### Sending a message

1. Navigate to `Message Box` > `New Message` &#x20;

<figure><img src="/files/7DFLNMQiVlvo8aj1QNs7" alt=""><figcaption><p>Message Box > New Message menu</p></figcaption></figure>

2. Select a channel, topic name and version. Click `Next` to proceed

<figure><img src="/files/kBDApcBKgeBwZzjrJ5We" alt=""><figcaption><p>Select channel and topic</p></figcaption></figure>

3. Fill the form and click `Next`

<figure><img src="/files/ZMG3RcIeQg23iB5z7nNn" alt=""><figcaption><p>New message form</p></figcaption></figure>

4. Review the JSON generated based on your form input in the previous step. Click `Send Message` to proceed

<figure><img src="/files/lHo1LJP3eSK2CMUkb38J" alt=""><figcaption><p>Review message</p></figcaption></figure>

5. Success message will be shown, click `Dismiss` to close modal

<figure><img src="/files/8LyZGuzIAPAwCsbqDqSn" alt="" width="375"><figcaption><p>Successfully sent a message</p></figcaption></figure>

#### Receiving a message

1. Navigate to `Message Box` > `My Messages`  and click on the channel you would like to view message from

<figure><img src="/files/8Hbmkc999PSRmSohWqKW" alt=""><figcaption><p>My messages channel list</p></figcaption></figure>

2. Click on `View Message` to see the message content

<figure><img src="/files/4gmjlaHPdJFLJwGn3Aq3" alt=""><figcaption><p>Received messages list</p></figcaption></figure>

3. Entry view will be shown by default, you may also switch to JSON view to see the received message. Refer to the next section for replying a message

<figure><img src="/files/7M8cBLWcUfZY4tFCaz6n" alt=""><figcaption><p>View message</p></figcaption></figure>

#### Replying a message

1. Click `Reply`  directly in the view message modal or in the received messages list

<figure><img src="/files/7o4ZXvydxSc6OhvskqIo" alt=""><figcaption><p>Reply message action</p></figcaption></figure>

2. Select a channel, topic name and version before clicking `Next`

<figure><img src="/files/lH3OjJ0htzF0SCFs6gtl" alt=""><figcaption><p>Select channel and topic</p></figcaption></figure>

3. Fill in the reply form and click `Next`

<figure><img src="/files/vsM14AMHoXbdoUKOS88N" alt=""><figcaption><p>Reply form</p></figcaption></figure>

4. Review the JSON generated based on your form input in the previous step. Click `Send Message` to proceed

<figure><img src="/files/wd80hYMSIWZePCUgkmMW" alt=""><figcaption><p>Review message</p></figcaption></figure>

5. Success message will be shown, click `Dismiss` to close modal

<figure><img src="/files/FCfdEiiUUlyBXj1g5x7u" alt="" width="375"><figcaption><p>Successfully sent a message</p></figcaption></figure>

#### Viewing sent messages

1. Navigate to `Message Box` > `Sent`  and click on the channel you would like to view messages that you have sent to

<figure><img src="/files/FhlQZm8PV8svmKaxwsSc" alt=""><figcaption><p>Sent messages channel list</p></figcaption></figure>

2. Click on `View message`&#x20;

<figure><img src="/files/lBtvJLCkchxH21UdE9LJ" alt=""><figcaption><p>Sent message list</p></figcaption></figure>

3. The message will be displayed. You may also switch between entry or JSON view. Refer to the next section for viewing recipients

<figure><img src="/files/lOm04CwCIU3DdhbmUhXt" alt=""><figcaption><p>View Message</p></figcaption></figure>

#### Viewing sent messages recipients

1. Click on `View recipients` in the sent messages page

<figure><img src="/files/yf6mSxlfIww9IMp8hEOO" alt=""><figcaption><p>View recipients action</p></figcaption></figure>

2. The recipient list will be displayed. Click `x` to close modal

<figure><img src="/files/bpFlsu0facoX8WQcodgs" alt=""><figcaption><p>Message recipient list</p></figcaption></figure>
