Conversation
rust/sample_applications/counter/envoy/src/counter/telemetry_collection_receiver.rs
Show resolved
Hide resolved
|
Note that this PR doesn't compile because of the enum changes |
|
|
||
| let receiver_options = receiver_options_builder | ||
| .topic_pattern(TELEMETRY_TOPIC_PATTERN) | ||
| .topic_pattern("akri/connector/resources/telemetry/{ex:connectorClientId}/{ex:deviceName}/{ex:inboundEndpointName}/assetUpdateEvent") |
There was a problem hiding this comment.
Why is this no longer a const? Is it because it's unique from the WoT?
There was a problem hiding this comment.
We could make it a const within the file if you like. The reason it was a const before is that it was common across Telemetries, so it was defined in a single place (the service module) and imported multiple times. In WoT, each event (telemetry) has its own pattern.
| .map(|(k, v)| (format!("ex:{k}"), v)) | ||
| .collect(); | ||
|
|
||
| topic_token_map.insert("modelId".to_string(), MODEL_ID.to_string()); |
There was a problem hiding this comment.
These are no longer necessary, I take it?
There was a problem hiding this comment.
"{modelId}" has been removed because WoT Thing Models have no ID. "{telemetryName}" has been removed because each Telemetry has its own MQTT topic pattern, so there is no need for this replaceable token, as there was when there was a single topic pattern for all Telemetries (in DTDL).
|
|
||
| use serde::{Deserialize, Serialize}; | ||
|
|
||
| /// The error code that identifies the error. |
There was a problem hiding this comment.
I realize this is generated from a document, but why does it call this a "code"?
There was a problem hiding this comment.
Are you asking why these lines are present in the AdrBaseService DTDL model?
| self.0.shutdown().await | ||
| } | ||
|
|
||
| fn get_err(field_name: &str) -> AIOProtocolError { |
for reference on what changes are present to the output. Opened this as a PR so we can comment on anything specific
I also included the generated WoT files as reference