private void getContextRecur()

in src/main/java/com/amazonaws/mskdatagen/producer/ApplyGenerator.java [50:66]


    private void getContextRecur(int failedAttempts, int throttledAttempts) {
        if (failedAttempts > MAX_FAILED_ATTEMPTS) {
            context.getContextMap().remove(ConfigType.TOPIC_SEQ_CONFIG);
            throw new IllegalStateException("Couldn't generate another event. State machine may be livelocked.");
        }

        if ("failed".equals(context.getGenerated().getState())) {
            advanceStep();
            failedAttempts++;
            getContextRecur(failedAttempts, throttledAttempts);
        } else if ("throttled".equals(context.getGenerated().getState())) {
            maybeBackoff(throttledAttempts);
            advanceStep();
            throttledAttempts++;
            getContextRecur(failedAttempts, throttledAttempts);
        }
    }