I'm going through the book of Jeremiah in my daily scripture readings right now. Jeremiah was called to prophesy to a stubborn and wicked nation, to warn Judah of the impending judgment of the Lord, and to endure the nation's rejection of God's message and messengers. Even in chapters 42 and 43, after the Exile has taken place and the Babylonians have destroyed Jerusalem, the remnant left in the land still wouldn't listen to God's commands and rejected the words of Jeremiah. Astonishingly, in the span of just a few minutes they promised to listen to Jeremiah and to do whatever God said, but after the prophesy was given they rejected it and accused Jeremiah of lying.
So was Jeremiah a failure? This is a valid question. After all, he spent his whole life warning people and calling them to repentance and had very, very little fruit from his efforts in his own lifetime. I'm afraid that by modern standards of success and failure (even standards used by the church sometimes) Jeremiah should be labeled a failure.
However, it is clear to us (sitting here 2,600 years after the fact) that Jeremiah was a true hero of the faith and by no means a failure. You are never a failure when you are obeying God's commands and fulfilling His will for your life. Jeremiah's legacy lives on. He may not have seen much fruit in his own lifetime, but how much spiritual fruit has been produced by the countless believers who have read his words over the last two and a half millennia? Only God knows the answer to that question.
We never know what impact our life will have on coming generations, and you can never tell how God will use your work for His glory. All you can do is to faithfully follow Him wherever He leads, trusting that He has a plan ... and that you are part of it.
For more thoughts about how to produce spiritual fruit no matter what your current circumstance is, see this post I wrote back in July.