Skip to main content

zmq4

The zmq4 output type attempts to send messages to a ZMQ4 port, currently only PUSH and PUB sockets are supported.

# Common config fields, showing default values
output:
label: ""
zmq4:
urls:
- tcp://*:5556
bind: true
socket_type: PUSH

ZMQ4 is supported but currently depends on C bindings. Since this is an annoyance when building or using Benthos it is not compiled by default.

There is a specific docker tag postfix -cgo for C builds containing ZMQ support.

You can also build it into your project by getting libzmq installed on your machine, then build with the tag:

go install -tags "ZMQ4" github.com/Jeffail/benthos/v3/cmd/benthos

Fields

urls

A list of URLs to connect to. If an item of the list contains commas it will be expanded into multiple URLs.

Type: array
Default: ["tcp://*:5556"]

# Examples
urls:
- tcp://localhost:5556

bind

Whether the URLs listed should be bind (otherwise they are connected to).

Type: bool
Default: true

socket_type

The socket type to send with.

Type: string
Default: "PUSH"
Options: PUSH, PUB.

high_water_mark

The message high water mark to use.

Type: int
Default: 0

poll_timeout

The maximum period of time to wait for a message to send before the request is abandoned and reattempted.

Type: string
Default: "5s"