Match topics to operations
A hierarchy such as site/area/line/machine/measurement can be a useful starting point. Agree on names across teams and decide how equipment identity survives relocation. Do not rename a topic consumed by several applications without a transition plan. Separate configuration from process measurements. Keep credentials, personal information and unnecessary commercial details out of topic names because they may appear in broker logs and administration tools. Assign an owner to the naming convention.
Write an explicit payload contract
A JSON message might include value, unit, equipment identifier, source timestamp and quality. Include a schema version and plan migrations for incompatible changes such as removing fields. Sending the same number in different units can produce wrong decisions without triggering a connection error. Use UTC for transmission and convert to local time in operator displays. Define how receivers handle missing or unknown fields. Preserve quality information instead of treating every successfully received message as a valid measurement.
QoS is not a business transaction guarantee
QoS 0 does not guarantee delivery; QoS 1 can deliver duplicates; QoS 2 provides a once-only delivery mechanism at the protocol level. These behaviours between a broker and client do not establish that a consuming application performed its database or ERP transaction exactly once. Give important events a unique identifier and prevent duplicate processing in the consumer. Test QoS choices against message importance, bandwidth and latency needs. Reconnects and failures during acknowledgements belong in that test set.
Do not mistake old data for live data
A retained message gives a new subscriber the last retained message; it is not a historical archive. Without a source timestamp and maximum age, an old value may look current. Test session settings, message expiry, reconnection and Last Will behaviour. Use TLS, user permissions and topic access rules together. Manage write access to command topics separately from read access to measurements. A readable telemetry topic should never imply permission to control equipment.
Technical references
Check manufacturer documentation for product capabilities. Project steps and examples were prepared by OPC Turkey.