Wireless sensor networks are commonly used to monitor and control the physical world. To provide a meaningful service such as disaster and emergency surveillance, meeting real-time constraints and the stability of transmit queues are the basic requirements of communication protocols in such networks. In this paper, we propose a closed architecture with two transmit queues at each sensor i, i.e., one for its own generated data, and the other for forwarding traffic. Our first main result concerns the stability of the forwarding queues at the nodes. It states that whether or not the forwarding queues can be stabilized (by appropriate choice of weighted fair queueing weights) depends only on routing and channel access rates of the sensors. Further, the weights of the weighted fair queues play a role in determining the tradeoff between the power allocated for forwarding and the delay of the forwarding traffic. We finally propose a distributed routing scheme for a broad class of wireless se...