If in this section we want to have a complete list of all the topics used by all the mappers, then we should add these missing topics. If we want to have a list of common topics used by all the mappers (e.g. tedge/measurements), then we should create dedicated documents for other mappers, put topics relevant to these mappers there, and link to these documents in this section.
Additional context
This section of the document is more than 1 year old, and was probably not kept in sync with the code. Documentation about topics used by the mappers, seems to be both worthwhile, and technically feasible, to test. We could create documentation tests which run a MQTT broker and a mapper, and then register to which topics the mapper subscribed. We could then check if these topics are properly mentioned in the documentation.
The tricky part is that mappers look like they can have some state, or some configuration determining to which topics they subscribe? Not sure, but this can be tricky to handle.
Also while it's relatively easy to check which topics mappers subscribe (they should subscribe to common tedge/ topics after all), it may be trickier to test whether they publish on the correct topics?
Is your documentation request related to a problem? Please describe.
I think most of the topics used by the tedge-mapper are missing from the relevant section in the documentation:
E.g. Cumulocity mapper defines more topics:
https://github.com/thin-edge/thin-edge.io/blob/6fcb0f69e6c373d0295935e9901d15cdca2872d7/crates/core/tedge_mapper/src/c8y/mapper.rs#L140-L163
https://github.com/thin-edge/thin-edge.io/blob/6fcb0f69e6c373d0295935e9901d15cdca2872d7/crates/core/tedge_mapper/src/c8y/mapper.rs#L44-L55
Describe the improvement you'd like
If in this section we want to have a complete list of all the topics used by all the mappers, then we should add these missing topics. If we want to have a list of common topics used by all the mappers (e.g.
tedge/measurements
), then we should create dedicated documents for other mappers, put topics relevant to these mappers there, and link to these documents in this section.Additional context
This section of the document is more than 1 year old, and was probably not kept in sync with the code. Documentation about topics used by the mappers, seems to be both worthwhile, and technically feasible, to test. We could create documentation tests which run a MQTT broker and a mapper, and then register to which topics the mapper subscribed. We could then check if these topics are properly mentioned in the documentation. The tricky part is that mappers look like they can have some state, or some configuration determining to which topics they subscribe? Not sure, but this can be tricky to handle. Also while it's relatively easy to check which topics mappers subscribe (they should subscribe to common
tedge/
topics after all), it may be trickier to test whether they publish on the correct topics?