There are chain of. Events for plague to happen . Number one the bacteria, flea, rat , human being . All the four should be at the same place at the right time for plague to happen . The best and cost effective way of prevention would be eliminating the vector ( flea) and the intermediate host ( the rat).
Rid of rats & fleas. To prevent plague, get rid of rats and their nesting places, keep pets healthy & flea-free, don't let pets roam in plague locations, use insect repellents and protective clothing if spending time in rodent or flea locations, and take preventive antibiotics if exposed to infected animals or if been bitten by high-risk fleas. There is no vaccine to prevent plague.