Configuration Reference
Every field in config.yaml, with type, default, and description. This is the authoritative field-by-field reference. For the conceptual explanation behind mode and simulator_mode, see Architecture โ System Modes and Architecture โ Simulator Modes.
system Sectionโ
daemon_addressโ
- Type:
string - Default:
127.0.0.1 - Description: The IP address or hostname on which the NSB Daemon is listening. Clients must use this same address when connecting.
daemon_portโ
- Type:
integer - Default:
65432 - Description: The port number on which the NSB Daemon listens for client connections. Make sure this port is not in use by another process.
modeโ
- Type:
integer - Values:
0(PULL) or1(PUSH) - Default:
0(PULL) - Description: Sets the system operation mode. See System Modes.
simulator_modeโ
- Type:
integer - Values:
0(System-Wide) or1(Per-Node) - Default:
1(Per-Node) - Description: Sets the simulator client mode. See Simulator Modes.
database Sectionโ
use_dbโ
- Type:
boolean - Values:
trueorfalse - Default:
true - Description: When
true, payloads are stored in a Redis database. The message key is routed through NSB, and the receiving client retrieves the full payload from Redis. Useful for large payloads. Whenfalse, payloads are transmitted directly through NSB without persistent storage.
db_addressโ
- Type:
string - Default:
127.0.0.1 - Description: The IP address or hostname of the Redis server.
db_portโ
- Type:
integer - Default:
5050 - Description: The port on which the Redis server is running. Note: Redis defaults to port
6379, but NSB examples and guides use port5050โ be sure to match yourredis-serverstartup command.
db_numโ
- Type:
integer - Default:
0 - Description: Redis database number to use. Redis supports multiple logical databases (0โ15 by default). Use
0unless you have a specific reason to separate data.
RabbitMQ Daemon Configurationโ
When using the Python RabbitMQ daemon (rabbit/nsb_daemon.py), configuration is passed programmatically via NSBDaemonConfig instead of a YAML file:
from nsb_daemon import NSBDaemon, NSBDaemonConfig
config = NSBDaemonConfig(
sys_mode=0, # 0 = PULL, 1 = PUSH
sim_mode=0, # 0 = SYSTEM_WIDE, 1 = PER_NODE
use_db=False, # Whether to use Redis
db_address="localhost",
db_port=6379,
db_num=0
)
daemon = NSBDaemon("localhost", 5672, config)
daemon.start()
Or run directly from the terminal (uses defaults):
python nsb_daemon.py
See RabbitMQ Backend for the full Python and C++ usage guide.
Environment Variable Configuration (Unified Client)โ
The Unified Client also supports backend selection via environment variables instead of constructor arguments:
export NSB_BACKEND=rabbitmq # or "socket"
export NSB_PORT=5672 # port for the selected backend
Go Deeperโ
- System Modes โ PULL vs PUSH behavior and recommendations
- Simulator Modes โ System-Wide vs Per-Node behavior and constraints
- Database Settings โ Redis setup, startup commands, and verification