aeron-driver/src/main/java/io/aeron/driver/Configuration.java
public static int producerWindowLength(final int termBufferLength, final int defaultTermWindowLength)
    {
        int termWindowLength = termBufferLength / 2;

        if (0 != defaultTermWindowLength)
        {
            termWindowLength = Math.min(defaultTermWindowLength, termWindowLength);
        }

        return termWindowLength;
    }
public static int producerWindowLength(final int termBufferLength, final int defaultTermWindowLength)
    {
        int termWindowLength = termBufferLength / 2;

        if (0 != defaultTermWindowLength)
        {
            termWindowLength = Math.min(defaultTermWindowLength, termWindowLength);
        }

        return termWindowLength;
    }
How far ahead a producer can get from a consumer position.

@param termBufferLength        for when default is not set and considering an appropriate minimum.
@param defaultTermWindowLength to take priority.
@return the length to be used for the producer window.