Adapter Registration Files
Every Adapter must be “known” to DREX-M before it can send or receive messages. Registration is done by dropping a small JSON file into a watched folder on the machine where DREX-M runs. DREX-M reads the file on startup and watches the folder for changes, so you can add, modify, or remove adapters without restarting containers.
Location & Naming
Tier where file lives | Folder path (default root =C:\abs) | File name rule
Site | C:\abs\config\drex-shared\adapters\ | <adapter-name>.json
Central | C:\abs\config\drex-shared\adapters\ | <adapter-name>.json
Site registration on Central | C:\abs\config\drex-central\vessels\ | <imo>.json
File name is not parsed — Drex trusts the Name field inside the JSON—but using the adapter name (or IMO for vessels) makes admin life easier.
Each adapter must have a unique name.
Adapter Configuration File
The JSON you drop into the adapters folder maps 1-to-1 to the protobuf messages CentralAdapterConfig and VesselAdapterConfig.
The file is still plain JSON; Drex simply deserialises it into the protobuf-defined contract.
// C:\abs\config\drex-shared\adapters\fleet.analytics.json
{
"Name": "fleet.analytics", // required, ≤150 chars, a-z 0-9 . _ -
"Ver": "1.0.0", // optional free-text version
"Direct": {
"Enable": true, // create direct inbox
"EnableFeedback": true // create feedback inbox
},
"Broadcast": {
"Enable": true, // create broadcast inbox
"Topics": [ // exact or wildcard topics
"fleet.#",
"engine.alerts"
]
}
}
# Field rules
JSON Path | Required? | Notes
Name | Yes | Lower-case, digits, ., _, or -, max 150 chars.
Ver | No | Free-text version string.
Direct.Enable | Yes | true → create the direct inbox queue. false (or omitted) → remove / do not create the queue.
Direct.EnableFeedback | No | true → create the feedback inbox queue.
Broadcast.Enable | Yes | true → create the broadcast inbox queue. false → remove / do not create the queue.
Broadcast.Topics[] | When Broadcast.Enable = true | At least one topic string. Wild-cards allowed: * (single segment) and # (multi-segment).
If you later disable a section (Enable = false), Drex deletes the corresponding queue and bindings after draining any in-flight messages.
Site registration on Central
Central needs a record of every Site that will connect.
// C:\abs\config\drex-central\vessels\demo-site.json
{
"Imo": "demo-site-01", // unique site ID (string)
"Name": "Demo Site"
}
Imo – serves as the site identifier; any non-empty string is acceptable.
If a site connects without a matching file, its shovel fails to bind and the messages will not flow.
Hot-reload behaviour
Drex subscribes to Windows FileSystemWatcher events on the registration folders. Changes are applied in near-real-time—typically within a second.
• Add / Modify
File is written and the OS raises a “Created” or “Changed” event.
Drex validates the JSON.
• If valid → queues / bindings are created or updated immediately.
• If invalid → the file is ignored and an error is written to container logs.
• Delete
“Deleted” event fires.
Drex removes the corresponding queues and bindings.
No container restarts are required and there is no polling delay—the update happens as soon as the file operation completes.
Common validation errors
Log message | Likely cause | Resolution
adapter name exceeds 150 | Name longer than 150 characters | Shorten the name.
illegal chars in name | Upper-case letters, spaces, or symbols in Name | Use only a-z, 0-9, ., _, -.
invalid JSON | Syntax error (trailing comma, bad quotes, etc.) | Validate with a JSON linter.
# Quick verification
After saving an adapter file, open RabbitMQ UI → Queues and confirm the relevant queues appear:
q.cc.drex.inbox.direct.adapter.<adapter name> (if enabled)
q.cc.drex.inbox.broadcast.adapter.<adapter name> (if enabled)
q.cc.drex.inbox.feedback.adapter.<adapter name> (if enabled)
If the queues do not show up within a few seconds, check Drex container logs for the validation errors listed above.