In IoT systems, devices send messages to a broker using topics structured like paths with levels separated by slashes. Subscribers listen to topics using filters that can include wildcards: '+' for one level and '#' for multiple levels. The broker matches published topics to subscriber filters and delivers messages accordingly. For example, a device publishing to 'home/kitchen/temperature' matches a subscriber filter 'home/+/temperature' because '+' matches 'kitchen'. However, 'home/livingroom/humidity' does not match 'home/+/temperature' because the last level differs. The '#' wildcard matches all subtopics under a prefix, such as 'home/#' matching any topic starting with 'home'. This design pattern helps organize and route IoT messages efficiently.