Inspired by methods of queueing theory, we propose a Markov model for the spread of viruses in an open population with an exogenous flow of infectives. We apply it to the diffusion of AIDS and hepatitis C diseases among drug users. From a mathematical point of view, the difference between the two viruses is shown in two parameters: the probability of curing the disease (which is 0 for AIDS but positive for hepatitis C) and the infection probability, which seems to be much higher for hepatitis. This model bears some resemblance to the M/M/∞ queueing system and is thus rather different from the models based on branching processes commonly used in the epidemiological literature. We carry out an asymptotic analysis (large initial population) and show that the Markov process is close to the solution of a nonlinear autonomous differential system. We prove both a law of large numbers and a functional central limit theorem to determine the speed of convergence towards the limiting system. The deterministic system itself converges, as time tends to ∞, to an equilibrium point. We then show that the sequence of stationary probabilities of the stochastic models shrinks to a Dirac measure at this point. This means that in a large population and for long-term analysis, we may replace the individual-based microscopic stochastic model with the macroscopic deterministic system without loss of precision. Moreover, we show how to compute the sensitivity of any functional of the Markov process with respect to a slight variation of any parameter of the model. This approach is applied to the spread of diseases among drug users, but could be applied to many other case studies in epidemiology.