refactoring on KafkaDispatcher