added factory create methods for consumer and producer