Re: Whooping cough for the 2nd time?
Of course you can be immune to bacterial infections.
The pertussis vaccine confers immunity for several years, having actually had the disease is even better.
It's possible to catch it twice, but if you were exposed again less than 5 years after, it's really unlikely you would get seriously ill. (you might catch it, but just have an ordinary cold/cough type thing, rather than the full whooping situation).
Don't stress too much, get some extra sleep, take some vitamins, you'll probably be fine.