add stop function to message consumer