fix issue of consumer hanging