private ArrayBlockingQueue<FileResource> buildQueue(Node docElement, Map<String, String> runtimeAttributes) {
        int maxQueueSize = DEFAULT_MAX_QUEUE_SIZE;
        String szString = runtimeAttributes.get(MAX_QUEUE_SIZE_KEY);

        if (szString == null) {
            Node szNode = docElement
                    .getAttributes()
                    .getNamedItem(MAX_QUEUE_SIZE_KEY);
            if (szNode != null) {
                szString = szNode.getNodeValue();
            }
        }

        if (szString != null) {
            try {
                maxQueueSize = Integer.parseInt(szString);
            } catch (NumberFormatException e) {
                //swallow
            }
        }

        if (maxQueueSize < 0) {
            maxQueueSize = DEFAULT_MAX_QUEUE_SIZE;
        }

        return new ArrayBlockingQueue<>(maxQueueSize);
    }
Builds a FileResourceBatchProcessor from runtime arguments and a
document node of a configuration file.  With the exception of the QueueBuilder,
the builders choose how to adjudicate between
runtime arguments and the elements in the configuration file.

@param docElement                document element of the xml config file
@param incomingRuntimeAttributes runtime arguments
@return FileResourceBatchProcessor
tika-batch/src/main/java/org/apache/tika/batch/builders/BatchProcessBuilder.java