LimitTokenCountFilter
Build a filter that only accepts tokens up to a maximum number. This filter will not consume any tokens beyond the maxTokenCount limit
See also
Build an filter that limits the maximum number of tokens per field.
Parameters
in
the stream to wrap
maxTokenCount
max number of tokens to produce
consumeAllTokens
whether all tokens from the input must be consumed even if maxTokenCount is reached.