fastiot.core.subject_helper module¶
- fastiot.core.subject_helper.sanitize_pub_subject_name(subject_name)[source]¶
This function will help you to check if the subject in right format and build it for you. In FastIoT Framework, the right format base for subject_name is: “v1.my_message**”, this will only subscribe till my_message level. If you want to build a hierarchy for this topic, the subject_name must be “v1.my_topic.*” or “v1.my_topic.>”
- Return type:
str
- In summary, it will do the following for you:
“MyMessage” -> “v1.my_message”;
“my_message” -> “v1.my_message”;
“MyMessage.*” -> “v1.my_message.*”
“my_message.*” -> “v1.my_message.*”
“v1.MyMessage” -> “v1.my_message”
“v1.my_message” -> “v1.my_message”
“v1.MyMessage” -> “v1.my_message”
“v1.my_message.*” -> “v1.my_message.*”
If the suffix is a “>” instead of a “*”, it will also be kept.