We build a stochastic model to analyze the dynamics of HIV in a homosexually active population. In our model, we introduce the effects of a hypothetical campaign that promotes HIV testing as well as the effect of a VEI (Vaccine Efficacy for Infectiousness) type vaccine. We analyze how the efficacy of the vaccine and campaign affect disease dynamics, particularly the probability of eventual extinction of the disease. The general conclusion is that increasing the efficacy of the vaccine results in a higher probability of extinction of the epidemic as expected. However, increasing the efficacy of the campaign above some optimum counter-intuitively decreases the probability of extinction. We find the minimum efficacy of the vaccine and the optimum efficacy of the campaign to drive the epidemic to extinction.