resource
Resource is an input type that channels messages from a resource input, identified by its name.
# Config fields, showing default valuesinput: resource: ""
Resources allow you to tidy up deeply nested configs. For example, the config:
input: broker: inputs: - kafka: addresses: [ TODO ] topics: [ foo ] consumer_group: foogroup - gcp_pubsub: project: bar subscription: baz
Could also be expressed as:
input: broker: inputs: - resource: foo - resource: bar
input_resources: - label: foo kafka: addresses: [ TODO ] topics: [ foo ] consumer_group: foogroup
- label: bar gcp_pubsub: project: bar subscription: baz
Resources also allow you to reference a single input in multiple places, such as multiple streams mode configs, or multiple entries in a broker input. However, when a resource is referenced more than once the messages it produces are distributed across those references, so each message will only be directed to a single reference, not all of them.
You can find out more about resources in xref:configuration:resources.adoc[].