# bloomberg/blazingmq architecture

> Architecture diagram of the GitHub repository bloomberg/blazingmq, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bloomberg/blazingmq
- Repository: https://github.com/bloomberg/blazingmq

## Overview

BlazingMQ is a distributed message-queue framework: applications publish messages and other applications consume them asynchronously, with brokers providing durable queueing and routing. The repository includes the C++ client, broker-side protocol and storage components, and command-line utilities. The graph follows that documented product workflow and the available source paths; implementation excerpts were limited, so some subsystem connections are not shown.

Main entry points: [`src/groups/mqb/mqbs`](https://github.com/bloomberg/blazingmq/tree/main/src/groups/mqb/mqbs) (File-backed storage), [`src/groups/mqb/mqbblp/mqbblp_storagemanager.cpp`](https://github.com/bloomberg/blazingmq/blob/main/src/groups/mqb/mqbblp/mqbblp_storagemanager.cpp) (Broker storage manager), [`src/groups/bmq/bmqa/bmqa_session.cpp`](https://github.com/bloomberg/blazingmq/blob/main/src/groups/bmq/bmqa/bmqa_session.cpp) (Client session API), [`src/groups/bmq/bmqimp/bmqimp_application.cpp`](https://github.com/bloomberg/blazingmq/blob/main/src/groups/bmq/bmqimp/bmqimp_application.cpp) (Client internals)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["C++ Client"]
  node_session["Client session API<br/>[bmqa_session.cpp]"]
  node_client_impl["Client internals"]
  node_client_channel["Client channels<br/>[bmqio_channel.cpp]"]
end

subgraph group_broker["Broker Runtime"]
  node_protocol["Message protocol<br/>[bmqp_protocol.cpp]"]
  node_broker_app["Broker application<br/>[bmqbrkr.m.cpp]"]
  node_broker_task["Broker task<br/>[m_bmqbrkr_task.cpp]"]
end

subgraph group_storage["Durable Storage"]
  node_storage_api["Storage interface"]
  node_cluster_storage["Cluster storage manager"]
  node_broker_storage["Broker storage manager"]
  node_file_store[("File-backed storage")]
end

subgraph group_tools["Command-Line Tools"]
  node_storage_tool["Storage inspection CLI"]
  node_command_processor["Storage commands"]
  node_journal_processor["Journal processing"]
  node_search_results["Search results"]
  node_storage_printer["Result printer"]
  node_bmqtool["Messaging CLI<br/>[bmqtool.m.cpp]"]
  node_inspector["Storage inspector"]
end

node_apps(("Producer / consumer apps"))

node_apps -->|"uses"| node_session
node_session -->|"delegates"| node_client_impl
node_client_impl -->|"communicates via"| node_client_channel
node_client_channel -->|"transfers events"| node_protocol
node_broker_app -->|"starts"| node_broker_task
node_protocol -->|"delivers events"| node_broker_task
node_broker_storage -->|"implements"| node_storage_api
node_cluster_storage -->|"manages persistence"| node_file_store
node_broker_storage -->|"uses"| node_file_store
node_storage_tool -->|"dispatches commands"| node_command_processor
node_command_processor -->|"processes journals"| node_journal_processor
node_journal_processor -->|"feeds records"| node_search_results
node_search_results -->|"prints results"| node_storage_printer
node_bmqtool -->|"offers inspection"| node_inspector
node_inspector -->|"reads files"| node_file_store

click node_session "https://github.com/bloomberg/blazingmq/blob/main/src/groups/bmq/bmqa/bmqa_session.cpp"
click node_client_impl "https://github.com/bloomberg/blazingmq/blob/main/src/groups/bmq/bmqimp/bmqimp_application.cpp"
click node_client_channel "https://github.com/bloomberg/blazingmq/blob/main/src/groups/bmq/bmqio/bmqio_channel.cpp"
click node_protocol "https://github.com/bloomberg/blazingmq/blob/main/src/groups/bmq/bmqp/bmqp_protocol.cpp"
click node_broker_app "https://github.com/bloomberg/blazingmq/blob/main/src/applications/bmqbrkr/bmqbrkr.m.cpp"
click node_broker_task "https://github.com/bloomberg/blazingmq/blob/main/src/applications/bmqbrkr/m_bmqbrkr_task.cpp"
click node_storage_api "https://github.com/bloomberg/blazingmq/blob/main/src/groups/mqb/mqbi/mqbi_storagemanager.h"
click node_cluster_storage "https://github.com/bloomberg/blazingmq/blob/main/src/groups/mqb/mqbc/mqbc_storagemanager.cpp"
click node_broker_storage "https://github.com/bloomberg/blazingmq/blob/main/src/groups/mqb/mqbblp/mqbblp_storagemanager.cpp"
click node_file_store "https://github.com/bloomberg/blazingmq/tree/main/src/groups/mqb/mqbs"
click node_storage_tool "https://github.com/bloomberg/blazingmq/blob/main/src/applications/bmqstoragetool/bmqstoragetool.m.cpp"
click node_command_processor "https://github.com/bloomberg/blazingmq/blob/main/src/applications/bmqstoragetool/m_bmqstoragetool_commandprocessor.cpp"
click node_journal_processor "https://github.com/bloomberg/blazingmq/blob/main/src/applications/bmqstoragetool/m_bmqstoragetool_journalfileprocessor.cpp"
click node_search_results "https://github.com/bloomberg/blazingmq/blob/main/src/applications/bmqstoragetool/m_bmqstoragetool_searchresult.cpp"
click node_storage_printer "https://github.com/bloomberg/blazingmq/blob/main/src/applications/bmqstoragetool/m_bmqstoragetool_printer.cpp"
click node_bmqtool "https://github.com/bloomberg/blazingmq/blob/main/src/applications/bmqtool/bmqtool.m.cpp"
click node_inspector "https://github.com/bloomberg/blazingmq/blob/main/src/applications/bmqtool/m_bmqtool_storageinspector.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_session,node_client_impl,node_client_channel toneBlue
class node_protocol,node_broker_app,node_broker_task toneAmber
class node_storage_api,node_cluster_storage,node_broker_storage,node_file_store toneMint
class node_storage_tool,node_command_processor,node_journal_processor,node_search_results,node_storage_printer,node_bmqtool,node_inspector toneRose
class node_apps toneIndigo
```

## Components

### C++ Client

- [Client session API](https://github.com/bloomberg/blazingmq/blob/main/src/groups/bmq/bmqa/bmqa_session.cpp): `src/groups/bmq/bmqa/bmqa_session.cpp`
- [Client internals](https://github.com/bloomberg/blazingmq/blob/main/src/groups/bmq/bmqimp/bmqimp_application.cpp): `src/groups/bmq/bmqimp/bmqimp_application.cpp`
- [Client channels](https://github.com/bloomberg/blazingmq/blob/main/src/groups/bmq/bmqio/bmqio_channel.cpp): `src/groups/bmq/bmqio/bmqio_channel.cpp`

### Broker Runtime

- [Message protocol](https://github.com/bloomberg/blazingmq/blob/main/src/groups/bmq/bmqp/bmqp_protocol.cpp): `src/groups/bmq/bmqp/bmqp_protocol.cpp`
- [Broker application](https://github.com/bloomberg/blazingmq/blob/main/src/applications/bmqbrkr/bmqbrkr.m.cpp): `src/applications/bmqbrkr/bmqbrkr.m.cpp`
- [Broker task](https://github.com/bloomberg/blazingmq/blob/main/src/applications/bmqbrkr/m_bmqbrkr_task.cpp): `src/applications/bmqbrkr/m_bmqbrkr_task.cpp`

### Durable Storage

- [Storage interface](https://github.com/bloomberg/blazingmq/blob/main/src/groups/mqb/mqbi/mqbi_storagemanager.h): `src/groups/mqb/mqbi/mqbi_storagemanager.h`
- [Cluster storage manager](https://github.com/bloomberg/blazingmq/blob/main/src/groups/mqb/mqbc/mqbc_storagemanager.cpp): `src/groups/mqb/mqbc/mqbc_storagemanager.cpp`
- [Broker storage manager](https://github.com/bloomberg/blazingmq/blob/main/src/groups/mqb/mqbblp/mqbblp_storagemanager.cpp): `src/groups/mqb/mqbblp/mqbblp_storagemanager.cpp`
- [File-backed storage](https://github.com/bloomberg/blazingmq/tree/main/src/groups/mqb/mqbs): `src/groups/mqb/mqbs`

### Command-Line Tools

- [Storage inspection CLI](https://github.com/bloomberg/blazingmq/blob/main/src/applications/bmqstoragetool/bmqstoragetool.m.cpp): `src/applications/bmqstoragetool/bmqstoragetool.m.cpp`
- [Storage commands](https://github.com/bloomberg/blazingmq/blob/main/src/applications/bmqstoragetool/m_bmqstoragetool_commandprocessor.cpp): `src/applications/bmqstoragetool/m_bmqstoragetool_commandprocessor.cpp`
- [Journal processing](https://github.com/bloomberg/blazingmq/blob/main/src/applications/bmqstoragetool/m_bmqstoragetool_journalfileprocessor.cpp): `src/applications/bmqstoragetool/m_bmqstoragetool_journalfileprocessor.cpp`
- [Search results](https://github.com/bloomberg/blazingmq/blob/main/src/applications/bmqstoragetool/m_bmqstoragetool_searchresult.cpp): `src/applications/bmqstoragetool/m_bmqstoragetool_searchresult.cpp`
- [Result printer](https://github.com/bloomberg/blazingmq/blob/main/src/applications/bmqstoragetool/m_bmqstoragetool_printer.cpp): `src/applications/bmqstoragetool/m_bmqstoragetool_printer.cpp`
- [Messaging CLI](https://github.com/bloomberg/blazingmq/blob/main/src/applications/bmqtool/bmqtool.m.cpp): `src/applications/bmqtool/bmqtool.m.cpp`
- [Storage inspector](https://github.com/bloomberg/blazingmq/blob/main/src/applications/bmqtool/m_bmqtool_storageinspector.cpp): `src/applications/bmqtool/m_bmqtool_storageinspector.cpp`

### Other components

- **Producer / consumer apps**

## Connections

- Producer / consumer apps → Client session API: uses
- Client session API → Client internals: delegates
- Client internals → Client channels: communicates via
- Client channels → Message protocol: transfers events
- Broker application → Broker task: starts
- Message protocol → Broker task: delivers events
- Broker storage manager → Storage interface: implements
- Cluster storage manager → File-backed storage: manages persistence
- Broker storage manager → File-backed storage: uses
- Storage inspection CLI → Storage commands: dispatches commands
- Storage commands → Journal processing: processes journals
- Journal processing → Search results: feeds records
- Search results → Result printer: prints results
- Messaging CLI → Storage inspector: offers inspection
- Storage inspector → File-backed storage: reads files
