# drop_on

> 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)

---
title: drop_on
latest-connect-version: 4.117.0
latest-operator-version: v26.2.5
latest-console-tag: v3.14.0
latest-redpanda-tag: v26.2.6
docname: outputs/drop_on
page-component-name: connect
page-version: master
page-component-version: master
page-component-title: Connect
page-relative-src-path: outputs/drop_on.adoc
page-edit-url: https://github.com/redpanda-data/rp-connect-docs/edit/main/modules/components/pages/outputs/drop_on.adoc
description: Attempts to write messages to a child output and if the write fails for one of a list of configurable reasons the message is dropped (acked) instead of being reattempted (or nacked).
page-git-created-date: "2024-05-24"
page-git-modified-date: "2026-10-29"
page-generated-sources:
  - include: connect:components:partial$descriptions/outputs/drop_on.adoc
    generator: null
    version: null
    source: the component specs in https://github.com/redpanda-data/connect
  - include: connect:components:partial$availability/outputs/drop_on.adoc
    generator: null
    version: null
    source: the component specs in https://github.com/redpanda-data/connect
  - include: connect:components:partial$fields/outputs/drop_on.adoc
    generator: null
    version: null
    source: the component specs in https://github.com/redpanda-data/connect
  - include: connect:components:partial$examples/outputs/drop_on.adoc
    generator: null
    version: null
    source: the component specs in https://github.com/redpanda-data/connect
page-generated-content: partial
---

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

Attempts to write messages to a child output and if the write fails for one of a list of configurable reasons the message is dropped (acked) instead of being reattempted (or nacked).

Regular Redpanda Connect outputs will apply back pressure when downstream services aren’t accessible, and Redpanda Connect retries (or nacks) all messages that fail to be delivered. However, in some circumstances, or for certain output types, we instead might want to relax these mechanisms, which is when this output becomes useful.

```yml
output:
  label: ""
  drop_on:
    error: false
    error_patterns: [] # No default (optional)
    back_pressure: "" # No default (optional)
    output: {} # No default (required)
```

## [](#fields)Fields

### [](#back_pressure)`back_pressure`

An optional duration string that determines the maximum length of time to wait for a given message to be accepted by the child output before the message should be dropped instead. The most common reason for an output to block is when waiting for a lost connection to be re-established. Once a message has been dropped due to back pressure all subsequent messages are dropped immediately until the output is ready to process them again. Note that if `error` is set to `false` and this field is specified then messages dropped due to back pressure will return an error response (are nacked or reattempted).

**Type**: `string`

```yaml
# Examples:
back_pressure: 30s

# ---

back_pressure: 1m
```

### [](#error)`error`

Whether messages should be dropped when the child output returns an error of any type. For example, this could be when an `http_client` output gets a 4XX response code. In order to instead drop only on specific error patterns use the `error_matches` field instead.

**Type**: `bool`

**Default**: `false`

### [](#error_patterns)`error_patterns[]`

A list of regular expressions (re2) where if the child output returns an error that matches any part of any of these patterns the message will be dropped.

Requires version 4.27.0 or later.

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

```yaml
# Examples:
error_patterns:
  - "and that was really bad$"

# ---

error_patterns:
  - "roughly [0-9]+ issues occurred"
```

### [](#output)`output`

A child output to wrap with this drop mechanism.

**Type**: `output`

## [](#examples)Examples

### [](#dropping-failed-http-requests)Dropping failed HTTP requests

In this example we have a fan\_out broker, where we guarantee delivery to our Kafka output, but drop messages if they fail our secondary HTTP client output.

```yaml
output:
  broker:
    pattern: fan_out
    outputs:
      - kafka:
          addresses: [ foobar:6379 ]
          topic: foo
      - drop_on:
          error: true
          output:
            http_client:
              url: http://example.com/foo/messages
              verb: POST
```

### [](#dropping-from-outputs-that-cannot-connect)Dropping from outputs that cannot connect

Most outputs that attempt to establish and long-lived connection will apply back-pressure when the connection is lost. The following example has a websocket output where if it takes longer than 10 seconds to establish a connection, or recover a lost one, pending messages are dropped.

```yaml
output:
  drop_on:
    back_pressure: 10s
    output:
      websocket:
        url: ws://example.com/foo/messages
```