throwing exception when there is nothing to be read from kafka