John 7:37–38 (ESV) … “On the last day of the feast, the great day, Jesus stood up and cried out, “If anyone thirsts, let him come to me and drink. Whoever believes in me, as the Scripture has said, ‘Out of his heart will flow rivers of living water.’”
John tells next of a last day (7:37–39), that great day of the annual feast of tabernacles. The last day of the feast was a special day. It was “an holy convocation … a solemn assembly” kept as a special sabbath (Leviticus 23:36; Numbers 29:35). At this feast the people thanked God for the harvest. To the instructions for keeping the feast given in the Old Testament the Jews had added another ritual, a rather attractive ritual, one that acknowledged their indebtedness to God for sending the rain without which there would be no harvest.
Each of the first seven days of the feast, at early dawn, the priests and people joined in joyful procession and made their way with a golden pitcher to the pool of Siloam. They filled the pitcher and returned to the temple. They then poured out the water at the west side of the altar as the temple choir burst into the great hallel (Psalms 113–118). Some think that this ritual was to commemorate the water that Moses brought from the riven rock (Exodus 17:1–7) and which typified Christ (1 Corinthians 10:4). Probably it symbolized God’s gift of rain (Zechariah 14:16–19), with an element of thanksgiving for the rains of the previous year and an element of petition for rain in the year to come.
On the eighth day of the feast this daily libation of water seems to have been omitted. This would make all the more pointed the Lord’s words, when “In the last day, that great day of the feast, Jesus stood and cried, saying, If any man thirst, let him come unto me, and drink. He that believeth on me, as the scripture hath said, out of his belly [innermost man] shall flow rivers of living water” (7:37–38). The reference is not to a single verse of Scripture but to the general theme of several Old Testament passages, such as Isaiah 12:3; 55:1; 58:11; Ezekiel 47:1; Joel 3:18; Zechariah 13:1; 14:8. As Israel in the Old Testament drank from that lifegiving stream flowing from the riven rock, so Christ offers those who believe in him an ever flowing, never failing, soul satisfying, thirst quenching inner supply of living water.
When Christ spoke to the woman at the well, he himself was the well of living water, a well that would meet her every need. Now, speaking to the Jerusalem throngs, he refers to the Holy Spirit as a river of living water, indeed, to rivers of living water, an overflowing supply able to minister to the needs of others. John makes this clear: “This spake he of the Spirit, which they that believe on him should receive: for the Holy Ghost was not yet given; because Jesus was not yet glorified” (7:39).
As Moses smote the rock, so it was that our Lord was smitten. He returned at length to his home on high and sent the Holy Spirit to take his place on earth. The Holy Spirit filled the disciples. On the day of Pentecost the rivers began to flow. The church was born. Thousands were saved. That ever flowing river flows still. Those who come to Christ are indwelt by the Holy Spirit, who is abundantly able to fill them and pour out his blessing to others.
 Phillips, J. (2009). Exploring the Gospel of John: An Expository Commentary (Jn 7:34–39). Kregel Publications; WORDsearch Corp.