add producer/consumer support