Router Service Setup and Run

This page shows the fastest path to install, configure, run, and verify the AstuteDDS Router service (astutedds-router).

Prerequisites

  • AstuteDDS built or installed
  • A router configuration YAML file
  • Optional: jq for JSON status inspection

Install Options

Install the router package:

sudo apt-get update
sudo apt-get install -y ./astutedds-router_<version>_<arch>.deb

Binary location after install:

/usr/bin/astutedds-router

Option 2: Run from build tree

If you built from source:

cd build
./bin/astutedds-router --help

Minimal Router Configuration

Create router.yaml:

status_file: "/tmp/astutedds-router-status.json"
status_interval_ms: 1000
security_enabled: false

domains:
  - domain_id: 0
    participant_id: 1
  - domain_id: 1
    participant_id: 2

routes:
  - source_domain: 0
    source_topic: "Circle"
    target_domain: 1
    target_topic: "Circle"
    type_name: "ShapesDemo::ShapeType"
    reliability: BEST_EFFORT
    durability: VOLATILE
    require_security: false

Start the Router Service

Foreground (debug-friendly)

astutedds-router ./router.yaml

From a build tree:

cd build
./bin/astutedds-router ../router.yaml

Background

nohup astutedds-router ./router.yaml > /tmp/astutedds-router.log 2>&1 &
echo $! > /tmp/astutedds-router.pid

Verify It Is Running

Check process

ps -ef | grep astutedds-router | grep -v grep

Check status JSON

cat /tmp/astutedds-router-status.json

With jq:

jq . /tmp/astutedds-router-status.json

Watch updates:

watch -n 1 'jq .routes /tmp/astutedds-router-status.json'

Stop the Router Service

If started in foreground, press Ctrl+C.

If started in background:

kill "$(cat /tmp/astutedds-router.pid)"

Run as a systemd Service

Create /etc/systemd/system/astutedds-router.service:

[Unit]
Description=AstuteDDS Router Service
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/astutedds-router /etc/astutedds/router.yaml
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

Enable and start:

sudo systemctl daemon-reload
sudo systemctl enable astutedds-router
sudo systemctl start astutedds-router
sudo systemctl status astutedds-router

Common Startup Issues

  • YAML parse errors: validate indentation and key names.
  • No forwarding: confirm domain IDs, topic names, and type_name match endpoints.
  • No status file: verify status_file path is writable by the router process.

Next Steps