In this paper we propose a routing strategy for enabling publish-subscribe communication in a sensor network. The approach is semi-probabilistic, in that it relies partly on the dissemination of subscription information and, in the areas where this is not available, on random rebroadcast of event messages. We illustrate the details of our approach, concisely describe its implementation in TinyOS [19] for the MICA2 platform [1], and evaluate its performance through simulation. Results show that our approach provides good delivery and low overhead, and is resilient to connectivity changes in the sensor network, as induced by the temporary standby necessary to preserve the energy of sensor nodes.