IOT sensors use the publish/subscribe model for communication to benefit from its decoupled nature with respect to space, time, and synchronization. Because of the heterogeneity of communicating parties, semantic decoupling is added as a fourth dimension. The added semantic decoupling complicates the matching process and reduces its efficiency. The proposed algorithm clusters subscriptions and events according to topic and performs the matching process within these clusters, which increases the throughput by reducing the matching time . Moreover, the accuracy of matching is improved when subscriptions must be fully approximated . This work shows the benefit of clustering, as well as the improvement in the matching accuracy and efficiency achieved using this approach.