head¶
Stop the pipeline after a fixed number of messages.
Synopsis¶
Description¶
The head stage lets only the first N messages pass and then stops the pipeline. This is useful for sampling or quick tests against a live source.
The message count is taken from messages seen in the stage direction (or both
when using -LR). When the limit is reached, the stage passes that message and
stops the pipeline.
Options¶
| Option | Type | Default | Description |
|---|---|---|---|
-n, --count |
int | 10 |
Number of messages to pass before stopping |
Examples¶
Stop after 20 updates from a live session:
Sample 100 messages in both directions: