Components
A good ninja gets clued up on its gear.
Core Components​
Every Benthos pipeline has at least one input, an optional buffer, an output and any number of processors:
input:kafka:addresses: [ TODO ]topics: [ foo, bar ]consumer_group: foogroupbuffer:type: nonepipeline:processors:- bloblang: |message = thismeta.link_count = links.length()output:aws_s3:bucket: TODOpath: '${! meta("kafka_topic") }/${! json("message.id") }.json'
These are the main components within Benthos and they provide the majority of useful behaviour.
Observability Components​
There are also the observability components http, logger, metrics, and tracing, which allow you to specify how Benthos exposes observability data:
http:address: 0.0.0.0:4195enabled: truedebug_endpoints: falselogger:prefix: benthoslevel: WARNjson_format: truemetrics:statsd:prefix: fooaddress: localhost:8125flush_period: 100mstracer:jaeger:agent_address: localhost:6831service_name: benthos
Resource Components​
Finally, there are caches and rate limits. These are components that are referenced by core components and can be shared.
input:http_client: # This is an inputurl: TODOrate_limit: foo_ratelimit # This is a reference to a rate limitpipeline:processors:- cache: # This is a processorresource: baz_cache # This is a reference to a cacheoperator: addkey: '${! json("id") }'value: "x"- bloblang: root = if errored() { deleted() }rate_limit_resources:- label: foo_ratelimitlocal:count: 500interval: 1scache_resources:- label: baz_cachememcached:addresses: [ localhost:11211 ]ttl: 60
It's also possible to configure inputs, outputs and processors as resources which allows them to be reused throughout a configuration with the resource
input, resource
output and resource
processor respectively.
For more information about any of these component types check out their sections: