kafka script taking too long