public EventSourceMappingConfiguration withMaximumRetryAttempts(Integer maximumRetryAttempts) {
        setMaximumRetryAttempts(maximumRetryAttempts);
        return this;
    }
<p>
(Kinesis and DynamoDB Streams only) Discard records after the specified number of retries. The default value is
-1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries
failed records until the record expires in the event source.
</p>

@param maximumRetryAttempts
       (Kinesis and DynamoDB Streams only) Discard records after the specified number of retries. The default
       value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite,
       Lambda retries failed records until the record expires in the event source.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-lambda/src/main/java/com/amazonaws/services/lambda/model/EventSourceMappingConfiguration.java