Mqtt topic case sensitivity slash mismatch — PLC Playground troubleshooting guide

MQTT Publisher Works, Subscriber Gets Nothing? Compare Every Character

A tiny topic-name difference can separate a working publisher from a silent subscriber. Compare the actual published topic with the subscription filter character by character.

Original topic examples; inspect actual broker permissions as well as matching.

What is happening?

MQTT topic matching is case-sensitive and uses slash-separated levels. Leading or trailing slashes and different capitalization can create different names. Broker authorization and subscription acknowledgment are additional checks after matching is confirmed.

Check these five things

  1. Capture the exact topic used by the publisher.

  2. Read the actual subscription filter.

  3. Compare capitalization and every topic level.

  4. Check subscription acknowledgment and broker permissions.

  5. Use a narrowly scoped test topic in the approved environment.

Worked example

In a teaching example, plant/Line1/pressure and plant/line1/pressure are different topics. A subscriber listening to one does not receive a publication on the other simply because the names look similar. A written naming convention prevents this class of mismatch.

Quick diagnostic reference

Difference Effect
Line1 versus line1 Different name
Leading slash Additional empty level
Wrong level Filter may not match

The mistake to avoid

A broad wildcard subscription can help controlled diagnosis but should not become an accidental production data contract. Keep topic scope explicit.

How to verify the fix

Test exact matching and intended wildcard cases, then confirm access controls and payload handling for the approved topic tree.

Field-work boundary: These are educational diagnostic guides. Use the exact equipment manuals and approved site procedures. Electrical testing and machinery changes belong to qualified, authorized personnel; control hazardous energy and validate affected functions before release.

Technical reference

HiveMQ: MQTT publish and subscribe topics. The examples and diagnostic tables above are original teaching material; they do not replace the product manual.

Continue troubleshooting

Previous Post