move configuration handling in utils project and reuse it in producer and consumer