FleetWise Edge integration
The solution supports two telemetry ingestion modes. In MQTT Direct mode, the simulator (or a real vehicle application) publishes JSON telemetry directly to IoT Core. In FleetWise Edge (FWE) mode, the AWS IoT FleetWise Edge Agent runs on the vehicle (or in a Docker container for simulation), collects raw CAN bus signals based on campaign instructions, encodes them as protobuf, and uploads them to the cloud. Both modes converge on the same cms-telemetry-preprocessed Kafka topic, so all downstream processors work identically regardless of the telemetry source.
Important
AWS IoT FleetWise is no longer open to new customers. The Reference Implementation for AWS IoT FleetWise
Agent lifecycle
The FWE agent follows a checkin-based lifecycle:
-
Startup — The agent starts, loads its static configuration (IoT endpoint, certificate, CAN bus interface), and connects to IoT Core using X.509 certificate authentication.
-
Checkin — The agent publishes a protobuf checkin message to
cms/fleetwise/vehicles/{vin}/checkins. The checkin includes the agent’s currentdocument_sync_ids— a list of collection scheme IDs the agent has already received and is actively running. -
IoT Rule routing — The IoT Rule
fw_{stage}_checkin_ruleencodes the binary protobuf as base64 and routes it to thefw-checkinKafka topic, including the vehicle VIN extracted from the MQTT topic path usingtopic(4). -
Campaign resolution — The CampaignSyncProcessor Flink application consumes the checkin, extracts the VIN, and queries the
cms-{stage}-campaignsDynamoDB table for all campaigns with statusRUNNINGthat target this vehicle. -
Scheme generation — For each active campaign, the processor generates a protobuf
CollectionSchememessage specifying which CAN signal IDs to collect and at what interval. It also generates aDecoderManifestprotobuf that maps CAN signal IDs to human-readable VSS signal names (for example, signal ID 1 →Vehicle.Speed). -
Scheme delivery — The processor publishes the combined decoder manifest and collection schemes to
cms/fleetwise/vehicles/{vin}/collection_schemes_and_decoder_manifestsvia IoT Core MQTT. -
Signal collection — The agent receives the schemes, configures its CAN bus listeners, and begins collecting the specified signals at the configured intervals.
-
Telemetry upload — The agent batches collected signals into a
VehicleDataprotobuf message and publishes it tocms/fleetwise/vehicles/{vin}/signals. -
Decode and mapping — The IoT Rule
fw_{stage}_iot_msk_ruleroutes the protobuf to thefw-telemetry-rawKafka topic. The FWTelemetryProcessor Flink application decodes the protobuf, maps each CAN signal ID to its standard JSON field name using the decoder manifest cached from DynamoDB, and outputs standard CMS-format JSON tocms-telemetry-preprocessed. -
Standard pipeline — From this point, the telemetry flows through the same processors as MQTT Direct data: EventDrivenTelemetryProcessor (Redis LKS), TripProcessor, SafetyProcessor, MaintenanceProcessor, and GeofenceProcessor.
Campaign states
Campaigns stored in DynamoDB have the following lifecycle:
-
RUNNING — Active campaign. The CampaignSyncProcessor includes this campaign’s collection scheme when responding to agent checkins.
-
SUSPENDED — Paused campaign. When all campaigns for a vehicle are suspended, the processor pushes an empty
CollectionSchemesprotobuf, which clears the agent’s active collection and stops signal upload. -
COMPLETED — Finished campaign. Ignored by the processor.
Campaign sync status is tracked per vehicle:
-
PENDING — Campaign scheme has been pushed to the agent but the agent has not confirmed receipt in its checkin
document_sync_ids. -
HEALTHY — Agent confirmed receipt of the collection scheme.
Protobuf decode process
The FWTelemetryProcessor performs the following steps for each message on the fw-telemetry-raw topic:
-
Extract the base64-encoded protobuf payload and the vehicle VIN from the IoT Rule metadata.
-
Base64-decode and parse the
VehicleDataprotobuf message. -
Iterate over each
CapturedSignalin the protobuf. Each signal has a numeric signal ID and a value. -
Look up the signal ID in the decoder manifest (cached from DynamoDB) to get the VSS signal name (for example,
Vehicle.Speed). -
Map the VSS signal name to the standard JSON field name using the signal catalog (for example,
Vehicle.Speed→speed). The mapping is cached in aConcurrentHashMapand falls back to a built-in defaults map for core signals. -
Resolve the vehicle’s active trip ID from a local cache (refreshed every 60 seconds from Redis) so the telemetry record can be tagged with the correct
tripId. -
Build a standard standard JSON object with all mapped fields, the VIN, timestamp, trip ID, and
source: "fleetwise". -
Output the JSON string to the
cms-telemetry-preprocessedKafka topic.
Failed decodes are dropped (not passed through as poison messages) and counted in a RECORDS_FAILED metric.