In order to attain high performance in wireless sensor networks, optimizations may be implemented in different layers of the protocol stack. We may also employ cross-layer algorithms, disrupting the "traditional" communication between layers. In fact, there is no ideal solution and you have to consider the particularities of the WSN and the target monitoring application. For example, you may employ queue management in the application layer or during routing, or even in more than one layer. There are some good papers that cover this topic.