> For the complete documentation index, see [llms.txt](https://docs.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.energyweb.org/legacy-documentation/ew-dos-technology-components-2023/decentralized-data-hub-ddhub/ddhub-message-broker.md). Agents can also search and read this documentation through its [MCP server](https://docs.energyweb.org/~gitbook/mcp).

# DDHub Message Broker

## Overview

DDHub Message Broker is a component that primarily provides message routing, persisting, and delivery for a seamless data exchange between participants within an energy market or supply chain.

The message broker promotes sovereignty of participants by:

* The broker does not have authority or logic which assumes the power of the participants
* No one except the participant themselves can govern data exchange channels and verify messages
* Encryption/decryption, signature validation, authorization, etc must be done under the participants domain ([Client Gateway](https://docs.energyweb.org/legacy-documentation/ew-dos-technology-components-2023/decentralized-data-hub-ddhub/ddhub-client-gateway.md))

## DDHub Message Broker Component Diagram

<figure><img src="https://2400236058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_pXALj14Egb-5Bal_p%2Fuploads%2Fx8gjCBkwzPbrtynGRLhv%2FEnergyWeb%20Architecture%20-%20Entry%20diagram%20(Latest)%20(3).png?alt=media&amp;token=faec9b0c-b338-42f1-a8cd-582e3f48329f" alt=""><figcaption></figcaption></figure>

Below are the Message Broker components which need to be hosted to deploy a Decentralized Data Hub:

* Message Broker App
* NATS Jetstream and Jetstream Store to store small data messages (small messages up to 2 MB) and channel configurations
* Azure Blob (or other large file) Store for large data messages and delimited files converted into blobs, as well as file metadata
* RDBMS for message topic and schema management

<figure><img src="https://github.com/energywebfoundation/ewf-gitbook/blob/develop/.gitbook/assets/Screenshot%202023-05-02%20at%204.29.24%20PM.png" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.energyweb.org/legacy-documentation/ew-dos-technology-components-2023/decentralized-data-hub-ddhub/ddhub-message-broker.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
