Metamaterial analogue of the Mössbauer effect