---
title: zmq4
latest-connect-version: 4.118.0
latest-operator-version: v26.2.6
latest-console-tag: v3.15.0
latest-redpanda-tag: v26.2.7
docname: outputs/zmq4
page-component-name: connect
page-version: master
page-component-version: master
page-component-title: Connect
page-relative-src-path: outputs/zmq4.adoc
page-edit-url: https://github.com/redpanda-data/rp-connect-docs/edit/main/modules/components/pages/outputs/zmq4.adoc
description: Writes messages to a ZeroMQ socket.
page-context-switcher:
  - name: Output
    to: /connect/components/outputs/zmq4/
  - name: Input
    to: /connect/components/inputs/zmq4/
page-self-managed-only: "true"
page-git-created-date: "2024-05-24"
page-git-modified-date: "2026-11-13"
page-generated-sources:
  - include: connect:components:partial$descriptions/outputs/zmq4.adoc
    generator: null
    version: null
    source: the component specs in https://github.com/redpanda-data/connect
  - include: connect:components:partial$availability/outputs/zmq4.adoc
    generator: null
    version: null
    source: the component specs in https://github.com/redpanda-data/connect
  - include: connect:components:partial$fields/outputs/zmq4.adoc
    generator: null
    version: null
    source: the component specs in https://github.com/redpanda-data/connect
page-generated-content: partial
---

# zmq4

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [connect-full.txt](https://docs.redpanda.com/connect-full.txt)

<!-- Source: https://docs.redpanda.com/connect/components/outputs/zmq4.md -->

Writes messages to a ZeroMQ socket.

This component links to the ZeroMQ C library (`libzmq`), so only cgo builds of Redpanda Connect include it. The standard release binaries, `rpk connect`, and the Docker images don’t include it.

To get a build that includes this component, either download the `redpanda-connect-cgo_<version>_linux_amd64.tar.gz` archive from the [Redpanda Connect releases](https://github.com/redpanda-data/connect/releases), or build from source with cgo enabled and the `x_benthos_extra` build tag:

```bash
# Install the libzmq headers first, for example on Debian or Ubuntu
sudo apt-get install libzmq3-dev

CGO_ENABLED=1 go build -tags x_benthos_extra,timetzdata ./cmd/redpanda-connect
```

Both builds link `libzmq` dynamically, so the machine that runs Redpanda Connect also needs the ZeroMQ shared library installed.

#### Common

```yml
output:
  label: ""
  zmq4:
    urls: [] # No default (required)
    bind: true
    socket_type: PUSH # No default (required)
```

#### Advanced

```yml
output:
  label: ""
  zmq4:
    urls: [] # No default (required)
    bind: true
    socket_type: PUSH # No default (required)
    high_water_mark: 0
    poll_timeout: 5s
```

> 📝 **NOTE**
>
> This component is available only in builds of Redpanda Connect that enable cgo. The standard release binaries, the Docker images, and the standard `rpk connect` plugin don’t include it. To use it, do one of the following:
>
> -   Download the `redpanda-connect-cgo_<version>_linux_amd64` archive from the [GitHub releases page](https://github.com/redpanda-data/connect/releases). This archive is available for Linux AMD64 only.
>
> -   Build Redpanda Connect from source with `CGO_ENABLED=1 go build -tags x_benthos_extra,timetzdata ./cmd/redpanda-connect`. The build needs a C compiler.
>
>
> The cgo archive and the source build both need the ZeroMQ library (`libzmq`), because they include the `zmq4` components.

## Fields

### `bind`

Whether to bind to the URLs and wait for peers to connect, instead of connecting to them.

**Type**: `bool`

**Default**: `true`

### `high_water_mark`

The message high water mark to use.

**Type**: `int`

**Default**: `0`

### `poll_timeout`

The poll timeout to use.

**Type**: `string`

**Default**: `5s`

### `socket_type`

The socket type to connect as.

**Type**: `string`

**Options**: `PUSH`, `PUB`

### `urls[]`

A list of ZeroMQ endpoints to connect to, or to bind when `bind` is `true`, using a transport such as `tcp://`, `ipc://`, or `inproc://`. If an item in the list contains commas, it is split into multiple endpoints.

**Type**: `array<string>`

```yaml
# Examples:
urls:
  - "tcp://localhost:5556"
```