The HELICS broker is the coordination hub of every federation. It routes publications to subscribers, dispatches messages between endpoints, and manages the global time advancement algorithm that keeps all federates synchronized. You can run a broker as a standalone process using theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/GMLC-TDC/HELICS/llms.txt
Use this file to discover all available pages before exploring further.
helics_broker executable, manage multiple brokers dynamically with helics_broker_server, or embed one directly in your C++ application using the BrokerApp class.
Starting a broker
The most common invocation passes-f (the minimum number of federates expected) and a log level:
term as the first argument:
Command-line flags
General options
Identity and type
Identity and type
| Flag | Short | Description |
|---|---|---|
--name | -n | Name to assign to this broker |
--type | -t | Core type: zmq (default), ipc, tcp, udp, mpi, test |
--root | Declare this broker as a root broker | |
--identifier | Alternative way to set the broker name |
Federation size and timing
Federation size and timing
| Flag | Description |
|---|---|
--federates / --minfed | Minimum number of federates that must connect before execution starts |
--minbrokers | Minimum number of sub-brokers or cores that must connect |
--maxiter | Maximum number of allowed time iterations |
--tick | Heartbeat interval in milliseconds (also accepts 10s, 45ms). After two missed ticks secondary actions are taken |
--timeout | Time to wait for a broker connection (milliseconds or time string) |
--error_timeout | Time to wait before disconnecting after an error |
Logging
Logging
| Flag | Description |
|---|---|
--loglevel | Global log level (higher = more output; -1 disables logging entirely) |
--consoleloglevel | Log level for console output only |
--fileloglevel | Log level for file output only |
--logfile | Path to the log output file |
--dumplog | Capture all messages and dump a complete log on termination |
Error handling
Error handling
| Flag | Description |
|---|---|
--terminate_on_error | Halt the entire co-simulation if any federate reports an error |
Network options (ZMQ, TCP, UDP)
ZMQ and TCP/UDP network flags
ZMQ and TCP/UDP network flags
| Flag | Description |
|---|---|
--interface | Local network interface for receiving connections |
--broker / -b | Address or identifier of a parent broker to connect to |
--broker_address | Full network address of the parent broker |
--brokername | Name of the parent broker |
--port | Port number for the broker |
--brokerport | Port for the broker priority port |
--localport | Port for the local receive port |
--portstart | Starting port for automatic port assignment |
--local | Bind to the loopback interface (default) |
--ipv4 | Bind to external IPv4 addresses |
--ipv6 | Bind to external IPv6 addresses |
--external | Bind to all external interfaces |
Interprocess (IPC) flags
Interprocess (IPC) flags
| Flag | Description |
|---|---|
--queueloc | Named location of the shared memory queue |
--brokerinit | Initialization string for the parent broker |
Terminal mode
When started withterm, the broker opens an interactive prompt where you can inspect and control it while it runs:
Status output
Thestatus command shows the live count of connected brokers, federates, and handles:
Info output
Theinfo command shows the broker’s name, connection status, and bound address:
Broker queries
Thequery command (in terminal mode or via the API) returns runtime information about the federation. For example, query counts returns the same JSON object as status:
federates, brokers, publications, subscriptions, endpoints, interfaces, and version. Full documentation of all available queries is in the Queries reference.
BrokerServer: dynamic broker creation
helics_broker_server is a coordinator that creates new brokers on demand rather than requiring you to start one per federation manually. It is currently experimental and works only with ZMQ.
BrokerServer command-line flags
| Flag | Short | Description |
|---|---|---|
--zmq | -z | Start a ZMQ broker server |
--zmqss | Start a ZMQ single-socket broker server | |
--tcp | -t | Start a TCP broker server |
--udp | -u | Start a UDP broker server |
--mpi | Start an MPI broker server | |
--duration | How long the server should run (default: 30 minutes) | |
--quiet | Suppress most printed output |
BrokerServer terminal commands
The broker server is marked experimental as of HELICS 2.2 and only supports ZMQ. Support for TCP, TCPSS, UDP, and MPI is planned for future releases.
Programmatic broker: BrokerApp C++ class
You can embed a broker directly in your C++ application using theBrokerApp class rather than launching a separate process. This is convenient in unit tests or when writing a single-process orchestrator:
BrokerApp constructor accepts the same arguments as helics_broker. The object keeps the broker alive for its lifetime and cleans up on destruction.