Cloud

drop

Drops all messages.

The drop output acknowledges each message as soon as it receives it and then discards it, without errors or side effects. Because it adds almost no overhead, it’s useful for measuring input and processing throughput without an output bottleneck, for temporarily disabling output while you develop a pipeline, for discarding unwanted messages in a switch output, and as the final fallback in a fallback output.

Use this reference to:

  • Look up drop output syntax and configuration

  • Find examples of drop in conditional routing

  • Identify use cases for drop output in pipelines

output:
  label: ""
  drop: {}

Examples

Conditional filtering

Use drop with the switch output to conditionally discard messages:

output:
  switch:
    cases:
      - check: this.type == "error"
        output:
          label: error_sink
          kafka:
            addresses: ["kafka:9092"]
            topic: errors
      - check: this.type == "debug"
        output:
          label: drop_debug
          drop: {}  # Don't process debug messages in production
      - output:
          label: main_sink
          kafka:
            addresses: ["kafka:9092"]
            topic: events

Final fallback after a dead letter topic

Use drop as the last output in a fallback chain, after a dead letter topic, so a message that neither output accepts is discarded instead of blocking the pipeline:

output:
  fallback:
    - redpanda:
        seed_brokers: ["redpanda:9092"]
        topic: primary_topic
        max_in_flight: 1
    - redpanda:
        seed_brokers: ["redpanda:9092"]
        topic: dlq_topic
    - drop: {}  # Last resort: drop if both outputs fail

Testing input throughput

Measure how fast your input can consume data without output bottlenecks:

input:
  kafka:
    addresses: ["kafka:9092"]
    topics: ["test"]
output:
  drop: {}  # Measure input consumption speed without output overhead

For more patterns on message routing, filtering, and when to use drop vs. other approaches, see the Message Routing Patterns cookbook.