public int getQueueSizeForTask(String taskType) {
        Preconditions.checkArgument(StringUtils.isNotBlank(taskType), "Task type cannot be blank");

        TaskServicePb.QueueSizesResponse sizes =
                stub.getQueueSizesForTasks(
                        TaskServicePb.QueueSizesRequest.newBuilder()
                                .addTaskTypes(taskType)
                                .build());

        return sizes.getQueueForTaskOrDefault(taskType, 0);
    }
Retrieve information about the task

@param taskId ID of the task
@return Task details
grpc-client/src/main/java/com/netflix/conductor/client/grpc/TaskClient.java