How to execute a processor AFTER a failed/successful output? #3920
-
|
I have a stream processor which reads messages, extracts certain information and puts them into a database. In rare cases this can fail due to duplications. I want to add metrics to that stream processor, exporting information about successful and failed executions. However,
... for this simple setup: input:
[...]
output:
fallback:
- sql_insert:
[...]
- switch:
retry_until_success: false
cases:
- check: 'meta("fallback_error").contains("pq: duplicate key value violates unique constraint")'
output:
drop: {}
- output:
stdout:
codec: lines |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
|
Hi @static-moonlight 👋 For the successful case, you can use the |
Beta Was this translation helpful? Give feedback.
Yep!