working example of consumer/producer