private void awaitStopTasks(Collection<ConnectorTaskId> ids) {
        long now = time.milliseconds();
        long deadline = now + config.getLong(WorkerConfig.TASK_SHUTDOWN_GRACEFUL_TIMEOUT_MS_CONFIG);
        for (ConnectorTaskId id : ids) {
            long remaining = Math.max(0, deadline - time.milliseconds());
            awaitStopTask(id, remaining);
        }
    }
@return the {@link ProducerConfig#TRANSACTIONAL_ID_CONFIG transactional ID} to use for a task that writes
records and/or offsets in a transaction. Not to be confused with {@link DistributedConfig#transactionalProducerId()},
which is not used by tasks at all, but instead, by the worker itself.
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/Worker.java