count
Counts messages starting from one, returning true until the counter reaches its target, at which point it will return false and reset the counter.
# Config fields, showing default valuescount:arg: 100
Each discrete count condition will have its own counter. Parallel processors containing a count condition will therefore count independently. It is, however, possible to share the counter across processor pipelines by defining the count condition as a resource.
Fields​
arg
​
A number to count towards.
Type: number
Default: 100
Examples​
This condition is useful when paired with the
read_until
input, as it can be
used to cut the input stream off once a certain number of messages have been
read:
# Only read 100 messages, and then exit.input:read_until:input:kafka:addresses: [ TODO ]topics: [ foo, bar ]consumer_group: foogroupcondition:not:count:arg: 100