Implement graceful shutdown of consumer