There are several factors that affect the performance of a wireless sensor network (WSN) namely storage capacity, energy loss, change in topology, network congestion, deployed environment, intermediate medium used for communication. Out of all these factors of WSN, this paper addresses two major challenges to be refined to decrease the depletion of energy and data loss due to congestion across the network. Initially, node degree and topology of sensor nodes are adjusted periodically at a regular time interval. This ends up in saving the battery power consumption of sensor nodes. The latter factor is a check done for congestion avoidance, by performing rate change using fuzzy logic to balance data flow. Moreover, once when congestion has occurred the search for the best path to reach; sink node is done using LRTA* (Learning Real-Time A Star) heuristic algorithm. Simulations were done to compare the network lifetime of the proposed congestion control mechanism with existing methods. Results show that the heuristic approach for congestion check performs better to the traditional methods. © Springer Nature Singapore Pte Ltd 2018.