Edge SDK -- Configuration Guide

Overview

The Zequent Edge SDK is configured primarily through Quarkus application.properties and environment variables. Configuration covers the edge identity, gRPC service endpoints, MQTT broker settings (for adapters that use MQTT), and operational parameters.

Table of Contents


Configuration Methods

Priority Order (highest to lowest)

  1. Environment Variables (e.g., ZEQUENT_EDGE_SN)
  2. System Properties (e.g., -Dzequent.edge.sn=...)
  3. .env file (automatically loaded by Quarkus)
  4. application.properties (defaults)

Quarkus maps property names to environment variable names by converting to uppercase and replacing dots and hyphens with underscores. For example:

PropertyEnvironment Variable
zequent.edge.snZEQUENT_EDGE_SN
zequent.edge.asset-typeZEQUENT_EDGE_ASSET_TYPE
quarkus.grpc.clients.live-data-service.hostQUARKUS_GRPC_CLIENTS_LIVE_DATA_SERVICE_HOST

Edge Identity Configuration

These properties identify your edge adapter instance to the platform. They are mapped through the EdgeClientConfig interface using Quarkus @ConfigMapping(prefix = "zequent.edge").

PropertyEnvironment VariableRequiredDefaultDescription
zequent.edge.endpointZEQUENT_EDGE_ENDPOINTYes--The address this adapter listens on (host:port)
zequent.edge.snZEQUENT_EDGE_SNYes--Serial number of the managed device
zequent.edge.asset-typeZEQUENT_EDGE_ASSET_TYPEYes--Asset type enum value (see below)
zequent.edge.asset-vendorZEQUENT_EDGE_ASSET_VENDORYes--Asset vendor enum value (see below)
zequent.edge.timeoutZEQUENT_EDGE_TIMEOUTNo30sCommand execution timeout (Duration)
zequent.edge.max-retriesZEQUENT_EDGE_MAX_RETRIESNo3Maximum retry attempts for failed operations
zequent.edge.asset-idZEQUENT_EDGE_ASSET_IDNo--Platform asset ID (set after registration)

Asset Type Values

ValueDescription
ASSET_TYPE_DOCKDocking station
ASSET_TYPE_DRONEStandalone drone
ASSET_TYPE_VEHICLEGround vehicle
ASSET_TYPE_RCRemote controller
ASSET_TYPE_UNKNOWNUnknown type

Asset Vendor Values

ValueDescription
DJIDJI
VENDOR_UNKNOWNUnknown vendor

Example

zequent.edge.endpoint=localhost:9001
zequent.edge.sn=YOUR_DEVICE_SN
zequent.edge.asset-type=ASSET_TYPE_DOCK
zequent.edge.asset-vendor=DJI
zequent.edge.timeout=30s
zequent.edge.max-retries=3

gRPC Client Configuration

The edge adapter connects to platform services (Live Data, Connector) via gRPC. Each client is configured using the standard Quarkus gRPC client properties.

Live Data Service

PropertyEnvironment VariableDefaultDescription
quarkus.grpc.clients.live-data-service.hostQUARKUS_GRPC_CLIENTS_LIVE_DATA_SERVICE_HOSTlocalhostHostname
quarkus.grpc.clients.live-data-service.portQUARKUS_GRPC_CLIENTS_LIVE_DATA_SERVICE_PORT8003Port
quarkus.grpc.clients.live-data-service.keep-alive-without-calls--trueKeep connection alive even without active RPCs

Connector Service

PropertyEnvironment VariableDefaultDescription
quarkus.grpc.clients.connector-service.hostQUARKUS_GRPC_CLIENTS_CONNECTOR_SERVICE_HOSTlocalhostHostname
quarkus.grpc.clients.connector-service.portQUARKUS_GRPC_CLIENTS_CONNECTOR_SERVICE_PORT8010Port
quarkus.grpc.clients.connector-service.keep-alive-without-calls--trueKeep connection alive even without active RPCs

Example

# Local development
quarkus.grpc.clients.live-data-service.host=localhost
quarkus.grpc.clients.live-data-service.port=8003
quarkus.grpc.clients.live-data-service.keep-alive-without-calls=true

quarkus.grpc.clients.connector-service.host=localhost
quarkus.grpc.clients.connector-service.port=8010
quarkus.grpc.clients.connector-service.keep-alive-without-calls=true

gRPC Server Configuration

The edge adapter itself exposes a gRPC server for receiving commands from the platform.

PropertyEnvironment VariableDefaultDescription
quarkus.http.hostQUARKUS_HTTP_HOST0.0.0.0Bind address
quarkus.http.portQUARKUS_HTTP_PORT9001HTTP/gRPC port
quarkus.grpc.server.use-separate-server--falseUse the same port for HTTP and gRPC

Example

quarkus.http.host=0.0.0.0
quarkus.http.port=9001
quarkus.grpc.server.use-separate-server=false

MQTT Configuration

Many edge adapters use MQTT to communicate with the physical device (e.g., DJI docks use MQTT for OSD telemetry, service commands, and state updates). MQTT is configured through the SmallRye Reactive Messaging MQTT connector.

Broker Configuration

Custom properties for the broker connection (used by adapter-specific code):

PropertyEnvironment VariableDescription
zequent.mqtt.broker.hostZEQUENT_MQTT_BROKER_HOSTMQTT broker hostname
zequent.mqtt.broker.usernameZEQUENT_MQTT_BROKER_USERNAMEMQTT username
zequent.mqtt.broker.passwordZEQUENT_MQTT_BROKER_PASSWORDMQTT password

Channel Configuration Pattern

Each MQTT channel (incoming or outgoing) follows this pattern:

# Incoming channel
mp.messaging.incoming.<channel-name>.connector=smallrye-mqtt
mp.messaging.incoming.<channel-name>.topic=<mqtt/topic/pattern>
mp.messaging.incoming.<channel-name>.host=<broker-host>
mp.messaging.incoming.<channel-name>.port=8883
mp.messaging.incoming.<channel-name>.username=<username>
mp.messaging.incoming.<channel-name>.password=<password>
mp.messaging.incoming.<channel-name>.ssl=true

# Outgoing channel
mp.messaging.outgoing.<channel-name>.connector=smallrye-mqtt
mp.messaging.outgoing.<channel-name>.host=<broker-host>
mp.messaging.outgoing.<channel-name>.port=8883
mp.messaging.outgoing.<channel-name>.username=<username>
mp.messaging.outgoing.<channel-name>.password=<password>
mp.messaging.outgoing.<channel-name>.ssl=true

Typical Channels for a DJI Adapter

Channel NameDirectionTopic PatternPurpose
osdIncomingthing/product/+/osdOn-screen display / telemetry
stateIncomingthing/product/+/stateDevice state changes
statusIncomingsys/product/+/statusTopology updates
status_replyOutgoing(dynamic)Topology update replies
cloud-to-dockOutgoing(dynamic)Commands sent to the dock
services-replyIncomingthing/product/+/services_replyReplies to service commands
requestsIncomingthing/product/+/requestsDevice-initiated requests
drc-upIncomingthing/product/+/drc/upDRC (Direct Remote Control) upstream data

Object Storage Configuration

If your adapter needs to upload files (e.g., KMZ flight plans) to object storage:

PropertyEnvironment VariableDescription
storage.endpointSTORAGE_ENDPOINTS3-compatible endpoint URL
storage.access-keySTORAGE_ACCESS_KEYAccess key
storage.secret-keySTORAGE_SECRET_KEYSecret key
storage.regionSTORAGE_REGIONStorage region

Example

storage.endpoint=https://s3.amazonaws.com
storage.access-key=YOUR_ACCESS_KEY
storage.secret-key=YOUR_SECRET_KEY
storage.region=eu-central-1

Monitoring and Observability

PropertyEnvironment VariableDefaultDescription
quarkus.micrometer.enabled--trueEnable Micrometer metrics
quarkus.micrometer.export.prometheus.enabled--trueEnable Prometheus exporter
quarkus.micrometer.export.prometheus.path--/q/metricsMetrics endpoint path
quarkus.otel.traces.enabled--trueEnable OpenTelemetry tracing
quarkus.otel.metrics.enabled--trueEnable OpenTelemetry metrics
quarkus.otel.logs.enabled--trueEnable OpenTelemetry log export
quarkus.otel.exporter.otlp.endpointQUARKUS_OTEL_EXPORTER_OTLP_ENDPOINThttp://localhost:4317OTLP collector endpoint

Example

quarkus.micrometer.enabled=true
quarkus.micrometer.export.prometheus.enabled=true
quarkus.micrometer.export.prometheus.path=/q/metrics
quarkus.otel.traces.enabled=true
quarkus.otel.exporter.otlp.endpoint=http://localhost:4317

Environment-Specific Examples

Local Development

# application.properties
quarkus.http.port=9001

zequent.edge.endpoint=localhost:9001
zequent.edge.sn=YOUR_DEVICE_SN
zequent.edge.asset-type=ASSET_TYPE_DOCK
zequent.edge.asset-vendor=DJI

quarkus.grpc.clients.live-data-service.host=localhost
quarkus.grpc.clients.live-data-service.port=8003

quarkus.grpc.clients.connector-service.host=localhost
quarkus.grpc.clients.connector-service.port=8010

quarkus.redis.hosts=redis://localhost:6379

quarkus.devservices.enabled=false

Docker Compose

Override via environment variables in your compose file:

services:
  edge-adapter:
    image: ghcr.io/zequent/edge-dji:latest
    ports:
      - "9001:9001"
    environment:
      - ZEQUENT_EDGE_ENDPOINT=edge-adapter:9001
      - ZEQUENT_EDGE_SN=YOUR_DEVICE_SN
      - QUARKUS_GRPC_CLIENTS_LIVE_DATA_SERVICE_HOST=live-data-service
      - QUARKUS_GRPC_CLIENTS_LIVE_DATA_SERVICE_PORT=8003
      - QUARKUS_GRPC_CLIENTS_CONNECTOR_SERVICE_HOST=connector-service
      - QUARKUS_GRPC_CLIENTS_CONNECTOR_SERVICE_PORT=8080
      - QUARKUS_REDIS_HOSTS=redis://redis:6379

Kubernetes

apiVersion: apps/v1
kind: Deployment
metadata:
  name: edge-dji
spec:
  template:
    spec:
      containers:
      - name: edge-dji
        image: ghcr.io/zequent/edge-dji:latest
        ports:
        - containerPort: 9001
        env:
        - name: ZEQUENT_EDGE_ENDPOINT
          value: "edge-dji:9001"
        - name: ZEQUENT_EDGE_SN
          valueFrom:
            secretKeyRef:
              name: edge-secrets
              key: device-sn
        - name: QUARKUS_GRPC_CLIENTS_LIVE_DATA_SERVICE_HOST
          value: "live-data-service"
        - name: QUARKUS_GRPC_CLIENTS_CONNECTOR_SERVICE_HOST
          value: "connector-service"
        - name: QUARKUS_REDIS_HOSTS
          value: "redis://redis:6379"

Troubleshooting

Problem: Adapter cannot connect to platform services

Check 1: Verify gRPC client settings:

echo $QUARKUS_GRPC_CLIENTS_LIVE_DATA_SERVICE_HOST
echo $QUARKUS_GRPC_CLIENTS_LIVE_DATA_SERVICE_PORT

Check 2: Test network connectivity:

nc -zv $QUARKUS_GRPC_CLIENTS_LIVE_DATA_SERVICE_HOST $QUARKUS_GRPC_CLIENTS_LIVE_DATA_SERVICE_PORT

Check 3: Look for connection errors in the logs:

gRPC stream failed for device XXXXX: UNAVAILABLE

Problem: Telemetry not arriving at the platform

Check 1: Verify the device serial number matches what is configured:

echo $ZEQUENT_EDGE_SN

Check 2: Look for telemetry stream logs:

Started gRPC telemetry stream for device XXXXX
Telemetry response received for device XXXXX

Check 3: Ensure the Live Data Service is running and reachable.

Problem: MQTT messages not being received

Check 1: Verify MQTT broker connection:

echo $ZEQUENT_MQTT_BROKER_HOST

Check 2: Check that MQTT topics match the device model's expected patterns.

Check 3: Look for MQTT connection logs on startup.

Problem: Configuration not taking effect

Check 1: Environment variables take precedence over application.properties. Verify no conflicting env vars are set.

Check 2: Quarkus caches configuration at startup. Restart the application after changing properties.

Check 3: Use Quarkus dev mode (./mvnw quarkus:dev) for live reload during development.

Was this page helpful?