The current state-of-the-art spatial window aggregation query processing algorithms in wireless sensor networks do not take node movement
link failures and node failures into consideration in an integrated way
which results in low query success rate and large energy consumption.We propose a spatial window query processing algorithm called RSA which takes advantage of node redundancy to ensure the robustness of query processing.It divides the query region into several grids and collects the data of the nodes within each grid along a well-designed itinerary.An adaptive grid size setting method and a representative node selection strategy for the grids is put forward to reduce energy consumption and increase query success rate.We propose an approach based on target rectangle to bypass the region without nodes in order to avoid interruptions in the process of query processing.Experimental results show that RSA outperforms the existing IWQE algorithm.