The section of the prophecies of consolation in Yirmiyahu ends in perek 33, with a prophecy which foretells the return of Judah and Israel and the revival of Jerusalem (1-13). This prophecy is given in the court of the guard, and appears to be a continuation to the prophecy of Yirmiyahu about the purchase of the field of Chanamel and the message of consolation which follows that. The second half of the prophecy deals with the eternal covenant between God and the house of Levi and the house of David. In contrast to the people's understanding, this covenant will not be broken with the destruction of the Temple, rather will continue eternally (14-26).
The historical background to the prophecy is described in the first pesukim in perek 34 (1-2): the siege on Jerusalem in the tenth year of Tzidkiyahu's reign. Immediately afterwards we see a personal prophecy of calamity for Tzidkiyahu which is mixed with a small amount of consolation (3-5). The main section of the perek tells us how during the siege, about a year and a half before the destruction, the people of Jerusalem made a covenant agreeing to free their slaves. When the siege was removed due to the victory of Pharaoh over the Babylonians (which turned out to be a temporary respite), the people of Jerusalem took back their slaves, thus breaking the covenant. Yirmiyahu rebukes the nation strongly for this act, prophesying that the destruction will come because of this infringement.
Courtesy of Matan Al HaPerek, Directed by Dr. Navah Cohen