Add common queries to producer and consumer

Transfer