That depends entirely on how it works, and how hard it is to adapt to.
Quinine was used to combat malaria for two centuries, and it's still pretty effective. It isn't used as much today because of its side effects, but the fact that it held up as effective for so long is impressive. Some of the modern antimalarial drugs have seen better resistance develop much faster.
It's at least partly a question of how much the bacteria would have to change itself to adapt. I would expect something really targeted -- that kills only that one type of bacteria and not other things (such as you) -- to be more likely to have an exploitable weakness than something that kills everything (e.g., mouthwash).
Quinine was used to combat malaria for two centuries, and it's still pretty effective. It isn't used as much today because of its side effects, but the fact that it held up as effective for so long is impressive. Some of the modern antimalarial drugs have seen better resistance develop much faster.
It's at least partly a question of how much the bacteria would have to change itself to adapt. I would expect something really targeted -- that kills only that one type of bacteria and not other things (such as you) -- to be more likely to have an exploitable weakness than something that kills everything (e.g., mouthwash).