-
Hi all, I'm syncing data to a SQL database and want it to fail if there is something wrong (i.e. bad connection, schema mapping, data, etc). Right now, the Here is a sample config I whipped up for easy repro. In a production scenario. I'm using postgres, but the same issue applies here with sqlite.
I've intentionally commented out the The output when running benthos with this config:
This continues forever until killing the process, where-as I would expect it to fail after the first try since I have the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hey @nickzelei you need to specify an alternative output to send the failed data or it'll be retried indefinitely. To do that stick your sql output inside a https://www.benthos.dev/docs/components/outputs/fallback, and then add an alternative output after it. For example if you want to just drop the data add the https://www.benthos.dev/docs/components/outputs/drop output as the second one. |
Beta Was this translation helpful? Give feedback.
Ah okay, not in this case,
.Run
would only return an error if the service is told to stop and can't within a certain amount of time, as this'd indicate that resources aren't fully cleaned up. In the sense of delivery guarantees within the stream processor itself those are all made explicit in your config, and when you run generate into something that might fail, and it fails, the stream processor will only ever continue to attempt to deliver the data. You can choose todrop
the data if you aren't interested in delivery guarantees, or ideally you'd redirect the data to some form of dead-letter queue, but it needs to be made explicit otherwise when the input source doesnt support nacks itse…