Cavity quantum electrodynamics provide a very powerful way to measure light states with atoms or atoms states with light via quantum non-demolition measurements. We present an experiment where the transmission of a weak probe through a microwave cavity allows to measure the dispersive shift induced by Rydberg atoms.