reject_errored
Rejects messages that have failed their processing steps, resulting in nack behaviour at the input level, otherwise sends them to a child output.
# Config fields, showing default values
output:
label: ""
reject_errored: null # No default (required)
The routing of messages rejected by this output depends on the type of input it came from. For inputs that support propagating nacks upstream such as AMQP or NATS the message will be nacked. However, for inputs that are sequential such as files or Kafka the messages will simply be reprocessed from scratch.
Examples
- Rejecting Failed Messages
- DLQing Failed Messages
The most straight forward use case for this output type is to nack messages that have failed their processing steps. In this example our mapping might fail, in which case the messages that failed are rejected and will be nacked by our input:
input:
nats_jetstream:
urls: [ nats://127.0.0.1:4222 ]
subject: foos.pending
pipeline:
processors:
- mutation: 'root.age = this.fuzzy.age.int64()'
output:
reject_errored:
nats_jetstream:
urls: [ nats://127.0.0.1:4222 ]
subject: foos.processed
Another use case for this output is to send failed messages straight into a dead-letter queue. We use it within a fallback output that allows us to specify where these failed messages should go to next.
pipeline:
processors:
- mutation: 'root.age = this.fuzzy.age.int64()'
output:
fallback:
- reject_errored:
http_client:
url: http://foo:4195/post/might/become/unreachable
retries: 3
retry_period: 1s
- http_client:
url: http://bar:4196/somewhere/else
retries: 3
retry_period: 1s