I remember when I was in transient to be shipped to Ft. Rich in Alaska (Army ‘67) they gave us all shots for the plague. Don't remember what type though. I bet all our guys in the service have had the shot if shipped overseas. I don't recall how long the shot last though.
No idea on how long it lasts either. On the other hand if you've ever discovered (through a variety of means) that you are naturally immune or resistant to cholera, diptheria, AIDS, and a couple of other diseases you are probably also immune to the plague.
There are several theories about why these diseases are unable to attack certain people, but nothing has yet been proven.