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

     1  ---
     2  title: zmq4
     3  type: input
     4  status: stable
     5  categories: ["Network"]
     6  ---
     7  
     8  <!--
     9       THIS FILE IS AUTOGENERATED!
    10  
    11       To make changes please edit the contents of:
    12       lib/input/zmq4.go
    13  -->
    14  
    15  import Tabs from '@theme/Tabs';
    16  import TabItem from '@theme/TabItem';
    17  
    18  
    19  Consumes messages from a ZeroMQ socket.
    20  
    21  
    22  <Tabs defaultValue="common" values={[
    23    { label: 'Common', value: 'common', },
    24    { label: 'Advanced', value: 'advanced', },
    25  ]}>
    26  
    27  <TabItem value="common">
    28  
    29  ```yaml
    30  # Common config fields, showing default values
    31  input:
    32    label: ""
    33    zmq4:
    34      urls:
    35        - tcp://localhost:5555
    36      bind: false
    37      socket_type: PULL
    38      sub_filters: []
    39  ```
    40  
    41  </TabItem>
    42  <TabItem value="advanced">
    43  
    44  ```yaml
    45  # All config fields, showing default values
    46  input:
    47    label: ""
    48    zmq4:
    49      urls:
    50        - tcp://localhost:5555
    51      bind: false
    52      socket_type: PULL
    53      sub_filters: []
    54      high_water_mark: 0
    55      poll_timeout: 5s
    56  ```
    57  
    58  </TabItem>
    59  </Tabs>
    60  
    61  ZMQ4 is supported but currently depends on C bindings. Since this is an
    62  annoyance when building or using Benthos it is not compiled by default.
    63  
    64  There is a specific docker tag postfix `-cgo` for C builds containing
    65  ZMQ support.
    66  
    67  You can also build it into your project by getting libzmq installed on your
    68  machine, then build with the tag:
    69  
    70  ```sh
    71  go install -tags "ZMQ4" github.com/Jeffail/benthos/v3/cmd/benthos
    72  ```
    73  
    74  ZMQ4 input supports PULL and SUB sockets only. If there is demand for other
    75  socket types then they can be added easily.
    76  
    77  ## Fields
    78  
    79  ### `urls`
    80  
    81  A list of URLs to connect to. If an item of the list contains commas it will be expanded into multiple URLs.
    82  
    83  
    84  Type: `array`  
    85  Default: `["tcp://localhost:5555"]`  
    86  
    87  ### `bind`
    88  
    89  Whether to bind to the specified URLs or connect.
    90  
    91  
    92  Type: `bool`  
    93  Default: `false`  
    94  
    95  ### `socket_type`
    96  
    97  The socket type to connect as.
    98  
    99  
   100  Type: `string`  
   101  Default: `"PULL"`  
   102  Options: `PULL`, `SUB`.
   103  
   104  ### `sub_filters`
   105  
   106  A list of subscription topic filters to use when consuming from a SUB socket. Specifying a single sub_filter of `''` will subscribe to everything.
   107  
   108  
   109  Type: `array`  
   110  Default: `[]`  
   111  
   112  ### `high_water_mark`
   113  
   114  The message high water mark to use.
   115  
   116  
   117  Type: `int`  
   118  Default: `0`  
   119  
   120  ### `poll_timeout`
   121  
   122  The poll timeout to use.
   123  
   124  
   125  Type: `string`  
   126  Default: `"5s"`  
   127  
   128