@@ -21,7 +21,10 @@ impl C8yMapperBuilder {
2121 } ;
2222 let mut flows = ConnectedFlowRegistry :: new ( flows_dir) ;
2323
24- flows. register_builtin ( crate :: mea:: message_cache:: MessageCache :: default ( ) ) ;
24+ let mapper_topic_id = self . config . service_topic_id . clone ( ) ;
25+ flows. register_builtin ( crate :: mea:: message_cache:: MessageCache :: new (
26+ mapper_topic_id,
27+ ) ) ;
2528 flows. register_builtin ( crate :: mea:: measurements:: MeasurementConverter :: default ( ) ) ;
2629 flows. register_builtin ( crate :: mea:: events:: EventConverter :: default ( ) ) ;
2730 flows. register_builtin ( crate :: mea:: alarms:: AlarmConverter :: default ( ) ) ;
@@ -109,7 +112,7 @@ topic = "{errors_topic}"
109112
110113steps = [
111114 {{ builtin = "add-timestamp", config = {{ property = "time", format = "unix", reformat = false }} }},
112- {{ builtin = "cache-early-messages", config = {{ topic_root = "{topic_prefix}", mapper_topic_id = "{mapper_topic_id}" }} }},
115+ {{ builtin = "cache-early-messages", config = {{ topic_root = "{topic_prefix}" }} }},
113116 {{ builtin = "into-c8y-measurements", config = {{ topic_root = "{topic_prefix}" }} }},
114117 {{ builtin = "limit-payload-size", config = {{ max_size = {max_size} }} }},
115118]
@@ -140,7 +143,7 @@ topic = "{errors_topic}"
140143
141144steps = [
142145 {{ builtin = "add-timestamp", config = {{ property = "time", format = "rfc3339", reformat = false }} }},
143- {{ builtin = "cache-early-messages", config = {{ topic_root = "{topic_prefix}", mapper_topic_id = "{mapper_topic_id}" }} }},
146+ {{ builtin = "cache-early-messages", config = {{ topic_root = "{topic_prefix}" }} }},
144147 {{ builtin = "into-c8y-events", config = {{ topic_root = "{topic_prefix}", c8y_prefix = "{c8y_prefix}", max_mqtt_payload_size = {max_mqtt_payload_size} }} }},
145148]
146149
@@ -171,7 +174,7 @@ topic = "{errors_topic}"
171174
172175steps = [
173176 {{ builtin = "add-timestamp", config = {{ property = "time", format = "rfc3339", reformat = false }} }},
174- {{ builtin = "cache-early-messages", config = {{ topic_root = "{topic_prefix}", mapper_topic_id = "{mapper_topic_id}" }} }},
177+ {{ builtin = "cache-early-messages", config = {{ topic_root = "{topic_prefix}" }} }},
175178 {{ builtin = "into-c8y-alarms", interval = "3s", config = {{ topic_root = "{topic_prefix}", c8y_prefix = "{c8y_prefix}" }} }},
176179 {{ builtin = "limit-payload-size", config = {{ max_size = {max_size} }} }},
177180]
@@ -201,7 +204,7 @@ topic = "{errors_topic}"
201204 r#"input.mqtt.topics = {input_topics:?}
202205
203206steps = [
204- {{ builtin = "cache-early-messages", config = {{ topic_root = "{topic_prefix}", mapper_topic_id = "{mapper_topic_id}" }} }},
207+ {{ builtin = "cache-early-messages", config = {{ topic_root = "{topic_prefix}" }} }},
205208 {{ builtin = "into-c8y-health-status", config = {{ topic_root = "{topic_prefix}", main_device = "{main_device}", c8y_prefix = "{c8y_prefix}" }} }},
206209]
207210
0 commit comments