If you're following too closely to stop, then yeah, you're breaking the law.
One my HS buddies is a state trooper near Austin. He put it this way..." you guys on bikes want to be treated like vehicles, with all the rights to ride in traffic and have people treat you with respect. Then you get out here in packs and ride six inches off each other's wheels at 30 mph and sometimes things go really wrong and someone gets badly hurt. It's pretty hard to feel sorry for you when five people crash into each other because they were following too closely".