github.com/Jeffail/benthos/v3@v3.65.0/website/docs/components/inputs/about.md (about) 1 --- 2 title: Inputs 3 sidebar_label: About 4 --- 5 6 An input is a source of data piped through an array of optional [processors][processors]: 7 8 ```yaml 9 input: 10 label: my_redis_input 11 12 redis_streams: 13 url: tcp://localhost:6379 14 streams: 15 - benthos_stream 16 body_key: body 17 consumer_group: benthos_group 18 19 # Optional list of processing steps 20 processors: 21 - bloblang: | 22 root.document = this.without("links") 23 root.link_count = this.links.length() 24 ``` 25 26 Some inputs have a logical end, for example a [`csv` input][input.csv] ends once the last row is consumed, when this happens the input gracefully terminates and Benthos will shut itself down once all messages have been processed fully. 27 28 It's also possible to specify a logical end for an input that otherwise doesn't have one with the [`read_until` input][input.read_until], which checks a condition against each consumed message in order to determine whether it should be the last. 29 30 ## Brokering 31 32 Only one input is configured at the root of a Benthos config. However, the root input can be a [broker][input.broker] which combines multiple inputs and merges the streams: 33 34 ```yaml 35 input: 36 broker: 37 inputs: 38 - kafka: 39 addresses: [ TODO ] 40 topics: [ foo, bar ] 41 consumer_group: foogroup 42 43 - redis_streams: 44 url: tcp://localhost:6379 45 streams: 46 - benthos_stream 47 body_key: body 48 consumer_group: benthos_group 49 ``` 50 51 ## Labels 52 53 Inputs have an optional field `label` that can uniquely identify them in observability data such as metrics and logs. This can be useful when running configs with multiple inputs, otherwise their metrics labels will be generated based on their composition. For more information check out the [metrics documentation][metrics.about]. 54 55 ### Sequential Reads 56 57 Sometimes it's useful to consume a sequence of inputs, where an input is only consumed once its predecessor is drained fully, you can achieve this with the [`sequence` input][input.sequence]. 58 59 ## Generating Messages 60 61 It's possible to generate data with Benthos using the [`generate` input][input.generate], which is also a convenient way to trigger scheduled pipelines. 62 63 import ComponentsByCategory from '@theme/ComponentsByCategory'; 64 65 ## Categories 66 67 <ComponentsByCategory type="inputs"></ComponentsByCategory> 68 69 import ComponentSelect from '@theme/ComponentSelect'; 70 71 <ComponentSelect type="inputs"></ComponentSelect> 72 73 [processors]: /docs/components/processors/about 74 [input.broker]: /docs/components/inputs/broker 75 [input.generate]: /docs/components/inputs/generate 76 [input.csv]: /docs/components/inputs/csv 77 [input.sequence]: /docs/components/inputs/sequence 78 [input.read_until]: /docs/components/inputs/read_until 79 [metrics.about]: /docs/components/metrics/about