unable shutting down collector when batch.size() < stream.maxMessages