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

     1  ---
     2  title: redis_pubsub
     3  type: input
     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/input/redis_pubsub.go
    13  -->
    14  
    15  import Tabs from '@theme/Tabs';
    16  import TabItem from '@theme/TabItem';
    17  
    18  
    19  Consume from a Redis publish/subscribe channel using either the SUBSCRIBE or
    20  PSUBSCRIBE commands.
    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  input:
    33    label: ""
    34    redis_pubsub:
    35      url: tcp://localhost:6379
    36      channels:
    37        - benthos_chan
    38      use_patterns: false
    39  ```
    40  
    41  </TabItem>
    42  <TabItem value="advanced">
    43  
    44  ```yaml
    45  # All config fields, showing default values
    46  input:
    47    label: ""
    48    redis_pubsub:
    49      url: tcp://localhost:6379
    50      kind: simple
    51      master: ""
    52      tls:
    53        enabled: false
    54        skip_cert_verify: false
    55        enable_renegotiation: false
    56        root_cas: ""
    57        root_cas_file: ""
    58        client_certs: []
    59      channels:
    60        - benthos_chan
    61      use_patterns: false
    62  ```
    63  
    64  </TabItem>
    65  </Tabs>
    66  
    67  In order to subscribe to channels using the `PSUBSCRIBE` command set
    68  the field `use_patterns` to `true`, then you can include glob-style
    69  patterns in your channel names. For example:
    70  
    71  - `h?llo` subscribes to hello, hallo and hxllo
    72  - `h*llo` subscribes to hllo and heeeello
    73  - `h[ae]llo` subscribes to hello and hallo, but not hillo
    74  
    75  Use `\` to escape special characters if you want to match them
    76  verbatim.
    77  
    78  ## Fields
    79  
    80  ### `url`
    81  
    82  The URL of the target Redis server. Database is optional and is supplied as the URL path. The scheme `tcp` is equivalent to `redis`.
    83  
    84  
    85  Type: `string`  
    86  Default: `"tcp://localhost:6379"`  
    87  
    88  ```yaml
    89  # Examples
    90  
    91  url: :6397
    92  
    93  url: localhost:6397
    94  
    95  url: redis://localhost:6379
    96  
    97  url: redis://:foopassword@redisplace:6379
    98  
    99  url: redis://localhost:6379/1
   100  
   101  url: redis://localhost:6379/1,redis://localhost:6380/1
   102  ```
   103  
   104  ### `kind`
   105  
   106  Specifies a simple, cluster-aware, or failover-aware redis client.
   107  
   108  
   109  Type: `string`  
   110  Default: `"simple"`  
   111  
   112  ```yaml
   113  # Examples
   114  
   115  kind: simple
   116  
   117  kind: cluster
   118  
   119  kind: failover
   120  ```
   121  
   122  ### `master`
   123  
   124  Name of the redis master when `kind` is `failover`
   125  
   126  
   127  Type: `string`  
   128  Default: `""`  
   129  
   130  ```yaml
   131  # Examples
   132  
   133  master: mymaster
   134  ```
   135  
   136  ### `tls`
   137  
   138  Custom TLS settings can be used to override system defaults.
   139  
   140  **Troubleshooting**
   141  
   142  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.
   143  
   144  
   145  Type: `object`  
   146  
   147  ### `tls.enabled`
   148  
   149  Whether custom TLS settings are enabled.
   150  
   151  
   152  Type: `bool`  
   153  Default: `false`  
   154  
   155  ### `tls.skip_cert_verify`
   156  
   157  Whether to skip server side certificate verification.
   158  
   159  
   160  Type: `bool`  
   161  Default: `false`  
   162  
   163  ### `tls.enable_renegotiation`
   164  
   165  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`.
   166  
   167  
   168  Type: `bool`  
   169  Default: `false`  
   170  Requires version 3.45.0 or newer  
   171  
   172  ### `tls.root_cas`
   173  
   174  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.
   175  
   176  
   177  Type: `string`  
   178  Default: `""`  
   179  
   180  ```yaml
   181  # Examples
   182  
   183  root_cas: |-
   184    -----BEGIN CERTIFICATE-----
   185    ...
   186    -----END CERTIFICATE-----
   187  ```
   188  
   189  ### `tls.root_cas_file`
   190  
   191  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.
   192  
   193  
   194  Type: `string`  
   195  Default: `""`  
   196  
   197  ```yaml
   198  # Examples
   199  
   200  root_cas_file: ./root_cas.pem
   201  ```
   202  
   203  ### `tls.client_certs`
   204  
   205  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.
   206  
   207  
   208  Type: `array`  
   209  Default: `[]`  
   210  
   211  ```yaml
   212  # Examples
   213  
   214  client_certs:
   215    - cert: foo
   216      key: bar
   217  
   218  client_certs:
   219    - cert_file: ./example.pem
   220      key_file: ./example.key
   221  ```
   222  
   223  ### `tls.client_certs[].cert`
   224  
   225  A plain text certificate to use.
   226  
   227  
   228  Type: `string`  
   229  Default: `""`  
   230  
   231  ### `tls.client_certs[].key`
   232  
   233  A plain text certificate key to use.
   234  
   235  
   236  Type: `string`  
   237  Default: `""`  
   238  
   239  ### `tls.client_certs[].cert_file`
   240  
   241  The path to a certificate to use.
   242  
   243  
   244  Type: `string`  
   245  Default: `""`  
   246  
   247  ### `tls.client_certs[].key_file`
   248  
   249  The path of a certificate key to use.
   250  
   251  
   252  Type: `string`  
   253  Default: `""`  
   254  
   255  ### `channels`
   256  
   257  A list of channels to consume from.
   258  
   259  
   260  Type: `array`  
   261  Default: `["benthos_chan"]`  
   262  
   263  ### `use_patterns`
   264  
   265  Whether to use the PSUBSCRIBE command.
   266  
   267  
   268  Type: `bool`  
   269  Default: `false`  
   270  
   271