I am a huge fan of breastfeeding, but I have a few stipulations:
1 - It must be mutually enjoyable for mother and baby. If it is stressing either one of you out for longer than a few weeks (it does take time to get the hang of it, so don't give up right away), then it is not worth it.
2 - The benefits of breastfeeding are many, but if it is causing health or emotional issues for you or your baby, or if you are killing yourself off trying to juggle breastfeeding and work because "breast is best" and it is leaving you a guilt-ridden, frazzled mess, switch to formula. Your baby will not miss out on his chance for Harvard Law because you didn't nurse him into his toddler years.
3 - Breastfeeding should be done discreetly - no flashing of boobs, no blocking an entire aisle of the grocery store and then getting angry and indignant when someone asks you to move to a more out-of-the-way location, and no rudeness.
4 - No posing for Time magazine cover photos with your three-year-old hanging off your breast as if it were the ice cream dispenser at Dairy Queen.
Like I say, I am a huge fan of breastfeeding. In many ways it is so much easier than formula feeding (nothing nicer than being able to pull your infant out of his crib at 3 a.m., latch him on, and then go back to sleep while he eats. Seriously, Mother Nature is brilliant). I think you should breastfeed as long as you and your baby want to continue it (note I said "baby," though I can understand why, in many parts of the world, breastfeeding continues for years). And though I personally wouldn't feel comfortable nursing a child who is past toddlerhood, quite honestly, I don't care if you want to breastfeed your four-year-old. However, I do care if your purpose in life shifts from doing something that is good for your child or practical for you to parading your breasts about like they are part of a crusade and daring the world to challenge your views.
This isn't about what age is too old for breastfeeding; obviously, reasonable people can and will disagree. This is about tackiness and shock value, neither of which advance the cause of encouraging more mothers to breastfeed, and neither of which facilitate kindness and understanding in people who are uncomfortable with mothers nursing their children in public.
That sounds like a failure to me.