@@ -110,89 +110,89 @@ The _sim-bridge_ uses a YAML-based configuration file. Below is a comprehensive
110
110
``` yaml
111
111
# Unique identifier for this simulation bridge instance
112
112
simulation_bridge :
113
- bridge_id : simulation_bridge
113
+ bridge_id : simulation_bridge # ID used to identify this instance of the sim-bridge
114
114
115
115
# RabbitMQ protocol adapter configuration
116
116
rabbitmq :
117
- host : localhost
118
- port : 5672
119
- vhost : /
120
- username : guest
121
- password : guest
122
- tls : false
117
+ host : localhost # RabbitMQ broker hostname or IP address
118
+ port : 5672 # Port for non-TLS AMQP connections (default: 5672)
119
+ vhost : / # Virtual host used in RabbitMQ
120
+ username : guest # Username for RabbitMQ authentication
121
+ password : guest # Password for RabbitMQ authentication
122
+ tls : false # Whether to use TLS (amqps) or not
123
123
124
124
infrastructure :
125
125
exchanges :
126
- - name : ex.input.bridge
127
- type : topic
128
- durable : true
129
- auto_delete : false
130
- internal : false
126
+ - name : ex.input.bridge # Exchange for receiving input messages from external systems
127
+ type : topic # Exchange type (topic allows pattern-based routing)
128
+ durable : true # Exchange survives broker restarts
129
+ auto_delete : false # Exchange won't be deleted when no longer used
130
+ internal : false # Exchange is available to external producers
131
131
132
- - name : ex.bridge.output
132
+ - name : ex.bridge.output # Exchange for sending output messages to external systems
133
133
type : topic
134
134
durable : true
135
135
auto_delete : false
136
136
internal : false
137
137
138
- - name : ex.sim.result
138
+ - name : ex.sim.result # Exchange for simulation result messages
139
139
type : topic
140
140
durable : true
141
141
auto_delete : false
142
142
internal : false
143
143
144
- - name : ex.bridge.result
144
+ - name : ex.bridge.result # Exchange for bridge-processed results
145
145
type : topic
146
146
durable : true
147
147
auto_delete : false
148
148
internal : false
149
149
150
150
queues :
151
- - name : Q.bridge.input
152
- durable : true
153
- exclusive : false
154
- auto_delete : false
151
+ - name : Q.bridge.input # Queue for receiving messages intended for the bridge
152
+ durable : true # Queue survives broker restarts
153
+ exclusive : false # Queue is not exclusive to one connection
154
+ auto_delete : false # Queue will not be deleted automatically
155
155
156
- - name : Q.bridge.result
156
+ - name : Q.bridge.result # Queue for receiving simulation results
157
157
durable : true
158
158
exclusive : false
159
159
auto_delete : false
160
160
161
161
bindings :
162
- - queue : Q.bridge.input
163
- exchange : ex.input.bridge
164
- routing_key : " #"
162
+ - queue : Q.bridge.input # Bind the input queue...
163
+ exchange : ex.input.bridge # ...to this exchange...
164
+ routing_key : " #" # ...with wildcard routing (all messages)
165
165
166
- - queue : Q.bridge.result
167
- exchange : ex.sim.result
168
- routing_key : " #"
166
+ - queue : Q.bridge.result # Bind the result queue...
167
+ exchange : ex.sim.result # ...to receive all simulation result messages
168
+ routing_key : " #" # ...with wildcard routing
169
169
170
170
# MQTT protocol adapter configuration
171
171
mqtt :
172
- host : localhost
173
- port : 1883
174
- keepalive : 60
175
- input_topic : bridge/input
176
- output_topic : bridge/output
177
- qos : 0
178
- username : guest
179
- password : guest
180
- tls : false
172
+ host : localhost # MQTT broker hostname or IP
173
+ port : 1883 # Port for MQTT (1883 for non-TLS, 8883 for TLS)
174
+ keepalive : 60 # Keep-alive interval in seconds for MQTT client
175
+ input_topic : bridge/input # Topic to subscribe to for receiving messages
176
+ output_topic : bridge/output # Topic to publish processed messages to
177
+ qos : 0 # Quality of Service level (0 = at most once)
178
+ username : guest # Username for MQTT authentication
179
+ password : guest # Password for MQTT authentication
180
+ tls : false # Whether to use secure MQTT (mqtts) or not
181
181
182
182
# REST protocol adapter configuration
183
183
rest :
184
- host : 0.0.0.0
185
- port : 5000
186
- endpoint : /message
187
- debug : false
188
- certfile : / certs/cert.pem
189
- keyfile : / certs/key.pem
184
+ host : 0.0.0.0 # REST API binds to all network interfaces
185
+ port : 5000 # Port for RESTful HTTP server
186
+ endpoint : /message # Endpoint path for sending messages to the bridge
187
+ debug : false # Disable Flask debug mode (set to true for development)
188
+ certfile : certs/cert.pem # Path to the TLS certificate file for HTTPS
189
+ keyfile : certs/key.pem # Path to the private key file for HTTPS
190
190
191
191
# Logging configuration
192
192
logging :
193
- level : INFO
194
- format : " %(asctime)s - %(name)s - %(levelname)s - %(message)s"
195
- file : logs/sim_bridge.log
193
+ level : INFO # Logging level (e.g., DEBUG, INFO, WARNING, ERROR)
194
+ format : " %(asctime)s - %(name)s - %(levelname)s - %(message)s" # Format of log messages
195
+ file : logs/sim_bridge.log # Path to the log output file
196
196
` ` `
197
197
198
198
> **Note:** Certificate files (` certfile.pem` and `keyfile.pem`) will be automatically created by the _sim-bridge_ if missing.
@@ -265,7 +265,7 @@ poetry run simulation-bridge -c /path/to/config.yaml
265
265
266
266
# # Use _sim-bridge_ as a Pip-Installable Package
267
267
268
- If you prefer to use `sim -bridge` as a standalone Python package, you can build and install it using the following steps :
268
+ If you prefer to use `simulation -bridge` as a standalone Python package, you can build and install it using the following steps :
269
269
270
270
# ## Build the Package
271
271
0 commit comments