Write
The Write Stage writes events to an existing Output.
Targets
The list if outputs to write to. There must be at least one. Use the reference panel to drag & drop outputs.
Write Return
In cases where you don’t care about handling the success/failure of a write, set this to Ignore Result. In this mode the pipeline hands the write to the connection thread and continues processing. If there is a write failure, the Pipeline status will update with the failure.
If you need to control success/failure paths, set this to Wait for Completion. The pipeline hands the write to the connection thread, but then waits for the I/O to complete. See below on logic for Success/Failure paths.
Wait for Complete will cause the pipeline to block waiting for the I/O to finish. This can significantly slow down pipeline performance. Only use this setting if you need to perform custom logic in the event of failures.
Success / Failure
When Wait for Complete is set, the stage provides alternative paths for successful and failed writes, allowing the pipeline to have special handling for write failures.
If all targets are written to successfully, the pipeline takes the success path. If a single target fails to write, the pipeline takes the failure path.
If the failure path is not connected, the write stage produces an error. If it is connected, a single event is sent to the failure path. Below is an example of a failure being sent to an error stage.
If Store & Forward is enabled for the connection and the write fails, the pipeline takes the failure path. The write is still inserted into the store & forward queue and is sent when the connection returns to good status.
The failure event includes the original event being written, as well as a writeResults
metadata
value that contains the status of each write. The metadata looks as follows:
// order matches the order of the target reference list
[
{
reference: string, // the target reference name
quality: string, // good or bad for success/failure
reason: string // the error message for the failed write
}
]