I can't say the amount of times this has been a focus on my therapy with someone else, but for myself, it's an ongoing issue. Sometimes the boundary issues are very clear. Someone is rude and annoying and you set the boundary that you want them to retrain from speaking to you like that. Simple (haha, really?). Others are not so easy. For example, when someone is rude, they're rarely rude to just one person, right? So say I set my boundaries with this person, but my friend and co-worker, Fred, doesn't. My day after day, my friend is annoyed and offended by this person and who do they talk to about their annoyance? Their friend (me), of course. That is just simply a more difficult boundary to set, in my experience.
However, it must be done. Sigh.