With the quick development in the application design of sensor networks, appropriate middleware, which provides efficient service for concurrent applications taking account into the scarce resources and sensor energy, is needediquestwhich provides efficient service for concurrent applications taking account into the scarce resources and sensor energy. In this paper, we propose a novel message oriented publish/subscribe middleware under the event triggered based subscription model to cater to the features of sensor networks and its applications. This middleware analyzes and decomposes compound subscription according to type and time interval,. Another weight information based greed algorithm is introduced for the low-energy state of nodes. The simulation results show that it is suitable to reduce communication overhead and prolong the lifetime of sensor networks.