github.com/Jeffail/benthos/v3@v3.65.0/website/docs/components/outputs/redis_list.md (about)

     1  ---
     2  title: redis_list
     3  type: output
     4  status: stable
     5  categories: ["Services"]
     6  ---
     7  
     8  <!--
     9       THIS FILE IS AUTOGENERATED!
    10  
    11       To make changes please edit the contents of:
    12       lib/output/redis_list.go
    13  -->
    14  
    15  import Tabs from '@theme/Tabs';
    16  import TabItem from '@theme/TabItem';
    17  
    18  
    19  Pushes messages onto the end of a Redis list (which is created if it doesn't
    20  already exist) using the RPUSH command.
    21  
    22  
    23  <Tabs defaultValue="common" values={[
    24    { label: 'Common', value: 'common', },
    25    { label: 'Advanced', value: 'advanced', },
    26  ]}>
    27  
    28  <TabItem value="common">
    29  
    30  ```yaml
    31  # Common config fields, showing default values
    32  output:
    33    label: ""
    34    redis_list:
    35      url: tcp://localhost:6379
    36      key: benthos_list
    37      max_in_flight: 1
    38      batching:
    39        count: 0
    40        byte_size: 0
    41        period: ""
    42        check: ""
    43  ```
    44  
    45  </TabItem>
    46  <TabItem value="advanced">
    47  
    48  ```yaml
    49  # All config fields, showing default values
    50  output:
    51    label: ""
    52    redis_list:
    53      url: tcp://localhost:6379
    54      kind: simple
    55      master: ""
    56      tls:
    57        enabled: false
    58        skip_cert_verify: false
    59        enable_renegotiation: false
    60        root_cas: ""
    61        root_cas_file: ""
    62        client_certs: []
    63      key: benthos_list
    64      max_in_flight: 1
    65      batching:
    66        count: 0
    67        byte_size: 0
    68        period: ""
    69        check: ""
    70        processors: []
    71  ```
    72  
    73  </TabItem>
    74  </Tabs>
    75  
    76  The field `key` supports
    77  [interpolation functions](/docs/configuration/interpolation#bloblang-queries), allowing
    78  you to create a unique key for each message.
    79  
    80  ## Performance
    81  
    82  This output benefits from sending multiple messages in flight in parallel for
    83  improved performance. You can tune the max number of in flight messages with the
    84  field `max_in_flight`.
    85  
    86  This output benefits from sending messages as a batch for improved performance.
    87  Batches can be formed at both the input and output level. You can find out more
    88  [in this doc](/docs/configuration/batching).
    89  
    90  ## Fields
    91  
    92  ### `url`
    93  
    94  The URL of the target Redis server. Database is optional and is supplied as the URL path. The scheme `tcp` is equivalent to `redis`.
    95  
    96  
    97  Type: `string`  
    98  Default: `"tcp://localhost:6379"`  
    99  
   100  ```yaml
   101  # Examples
   102  
   103  url: :6397
   104  
   105  url: localhost:6397
   106  
   107  url: redis://localhost:6379
   108  
   109  url: redis://:foopassword@redisplace:6379
   110  
   111  url: redis://localhost:6379/1
   112  
   113  url: redis://localhost:6379/1,redis://localhost:6380/1
   114  ```
   115  
   116  ### `kind`
   117  
   118  Specifies a simple, cluster-aware, or failover-aware redis client.
   119  
   120  
   121  Type: `string`  
   122  Default: `"simple"`  
   123  
   124  ```yaml
   125  # Examples
   126  
   127  kind: simple
   128  
   129  kind: cluster
   130  
   131  kind: failover
   132  ```
   133  
   134  ### `master`
   135  
   136  Name of the redis master when `kind` is `failover`
   137  
   138  
   139  Type: `string`  
   140  Default: `""`  
   141  
   142  ```yaml
   143  # Examples
   144  
   145  master: mymaster
   146  ```
   147  
   148  ### `tls`
   149  
   150  Custom TLS settings can be used to override system defaults.
   151  
   152  **Troubleshooting**
   153  
   154  Some cloud hosted instances of Redis (such as Azure Cache) might need some hand holding in order to establish stable connections. Unfortunately, it is often the case that TLS issues will manifest as generic error messages such as "i/o timeout". If you're using TLS and are seeing connectivity problems consider setting `enable_renegotiation` to `true`, and ensuring that the server supports at least TLS version 1.2.
   155  
   156  
   157  Type: `object`  
   158  
   159  ### `tls.enabled`
   160  
   161  Whether custom TLS settings are enabled.
   162  
   163  
   164  Type: `bool`  
   165  Default: `false`  
   166  
   167  ### `tls.skip_cert_verify`
   168  
   169  Whether to skip server side certificate verification.
   170  
   171  
   172  Type: `bool`  
   173  Default: `false`  
   174  
   175  ### `tls.enable_renegotiation`
   176  
   177  Whether to allow the remote server to repeatedly request renegotiation. Enable this option if you're seeing the error message `local error: tls: no renegotiation`.
   178  
   179  
   180  Type: `bool`  
   181  Default: `false`  
   182  Requires version 3.45.0 or newer  
   183  
   184  ### `tls.root_cas`
   185  
   186  An optional root certificate authority to use. This is a string, representing a certificate chain from the parent trusted root certificate, to possible intermediate signing certificates, to the host certificate.
   187  
   188  
   189  Type: `string`  
   190  Default: `""`  
   191  
   192  ```yaml
   193  # Examples
   194  
   195  root_cas: |-
   196    -----BEGIN CERTIFICATE-----
   197    ...
   198    -----END CERTIFICATE-----
   199  ```
   200  
   201  ### `tls.root_cas_file`
   202  
   203  An optional path of a root certificate authority file to use. This is a file, often with a .pem extension, containing a certificate chain from the parent trusted root certificate, to possible intermediate signing certificates, to the host certificate.
   204  
   205  
   206  Type: `string`  
   207  Default: `""`  
   208  
   209  ```yaml
   210  # Examples
   211  
   212  root_cas_file: ./root_cas.pem
   213  ```
   214  
   215  ### `tls.client_certs`
   216  
   217  A list of client certificates to use. For each certificate either the fields `cert` and `key`, or `cert_file` and `key_file` should be specified, but not both.
   218  
   219  
   220  Type: `array`  
   221  Default: `[]`  
   222  
   223  ```yaml
   224  # Examples
   225  
   226  client_certs:
   227    - cert: foo
   228      key: bar
   229  
   230  client_certs:
   231    - cert_file: ./example.pem
   232      key_file: ./example.key
   233  ```
   234  
   235  ### `tls.client_certs[].cert`
   236  
   237  A plain text certificate to use.
   238  
   239  
   240  Type: `string`  
   241  Default: `""`  
   242  
   243  ### `tls.client_certs[].key`
   244  
   245  A plain text certificate key to use.
   246  
   247  
   248  Type: `string`  
   249  Default: `""`  
   250  
   251  ### `tls.client_certs[].cert_file`
   252  
   253  The path to a certificate to use.
   254  
   255  
   256  Type: `string`  
   257  Default: `""`  
   258  
   259  ### `tls.client_certs[].key_file`
   260  
   261  The path of a certificate key to use.
   262  
   263  
   264  Type: `string`  
   265  Default: `""`  
   266  
   267  ### `key`
   268  
   269  The key for each message, function interpolations can be optionally used to create a unique key per message.
   270  This field supports [interpolation functions](/docs/configuration/interpolation#bloblang-queries).
   271  
   272  
   273  Type: `string`  
   274  Default: `"benthos_list"`  
   275  
   276  ```yaml
   277  # Examples
   278  
   279  key: benthos_list
   280  
   281  key: ${!meta("kafka_key")}
   282  
   283  key: ${!json("doc.id")}
   284  
   285  key: ${!count("msgs")}
   286  ```
   287  
   288  ### `max_in_flight`
   289  
   290  The maximum number of messages to have in flight at a given time. Increase this to improve throughput.
   291  
   292  
   293  Type: `int`  
   294  Default: `1`  
   295  
   296  ### `batching`
   297  
   298  Allows you to configure a [batching policy](/docs/configuration/batching).
   299  
   300  
   301  Type: `object`  
   302  
   303  ```yaml
   304  # Examples
   305  
   306  batching:
   307    byte_size: 5000
   308    count: 0
   309    period: 1s
   310  
   311  batching:
   312    count: 10
   313    period: 1s
   314  
   315  batching:
   316    check: this.contains("END BATCH")
   317    count: 0
   318    period: 1m
   319  ```
   320  
   321  ### `batching.count`
   322  
   323  A number of messages at which the batch should be flushed. If `0` disables count based batching.
   324  
   325  
   326  Type: `int`  
   327  Default: `0`  
   328  
   329  ### `batching.byte_size`
   330  
   331  An amount of bytes at which the batch should be flushed. If `0` disables size based batching.
   332  
   333  
   334  Type: `int`  
   335  Default: `0`  
   336  
   337  ### `batching.period`
   338  
   339  A period in which an incomplete batch should be flushed regardless of its size.
   340  
   341  
   342  Type: `string`  
   343  Default: `""`  
   344  
   345  ```yaml
   346  # Examples
   347  
   348  period: 1s
   349  
   350  period: 1m
   351  
   352  period: 500ms
   353  ```
   354  
   355  ### `batching.check`
   356  
   357  A [Bloblang query](/docs/guides/bloblang/about/) that should return a boolean value indicating whether a message should end a batch.
   358  
   359  
   360  Type: `string`  
   361  Default: `""`  
   362  
   363  ```yaml
   364  # Examples
   365  
   366  check: this.type == "end_of_transaction"
   367  ```
   368  
   369  ### `batching.processors`
   370  
   371  A list of [processors](/docs/components/processors/about) to apply to a batch as it is flushed. This allows you to aggregate and archive the batch however you see fit. Please note that all resulting messages are flushed as a single batch, therefore splitting the batch into smaller batches using these processors is a no-op.
   372  
   373  
   374  Type: `array`  
   375  Default: `[]`  
   376  
   377  ```yaml
   378  # Examples
   379  
   380  processors:
   381    - archive:
   382        format: lines
   383  
   384  processors:
   385    - archive:
   386        format: json_array
   387  
   388  processors:
   389    - merge_json: {}
   390  ```
   391  
   392