General Advice/Pattern for Output Plugin Error Handling approach

Can anybody advise or publish details on a standard approach to output plugin error handling?
To elaborate on my question:
I want to have a little of durability built into my agent such that if I fail to successfully write to an output plugin such as Kafka (for example), then I can define some config to say ‘do this’.
Ideally I would like the ability to define a config block as an alternative output such that I can offload my agent resources by pushing to the alternative output (which may simply be batching and writing to an external endpoint for example). This way I have a better chance not to lose the data and at the same time avoid the need to have the agent consume lots of memory etc…
I want the right balance here and wondered if anybody has done this or thought of a good common approach to having an error handler be able to switch to an alternative output plugin (which could be a different type).
Hope this makes sense.
Thanks, Jay