code: @Override
  	void sendTaskEvent(TaskEvent event) throws IOException {
  		checkError();
  		checkState(subpartitionView != null, "Tried to send task event to producer before requesting the subpartition.");
  
  		if (!taskEventPublisher.publish(partitionId, event)) {
  			throw new IOException("Error while publishing event " + event + " to producer. The producer could not be found.");
  		}
  	}
docs: ------------------------------------------------------------------------