Trigger Delivery Policy examples
This section outlines two examples of Trigger Delivery Policy.
A Simple Trigger Delivery Policy
The following Trigger Delivery Policy discards events on any error. This is the only behaviour previous Data Orchestrator versions (i.e. < 1.1) allowed.
{
"name" : "simple_policy",
"maximum_capacity" : 100,
"error_handlers" : [
{
"on" : "any_error",
"strategy" : "discard"
}
]
}
A More Complex Trigger Delivery Policy
The following policy has a different behaviour depending on whether the HTTP delivery error is a client or a server one.
{
"name" : "complex_policy",
"maximum_capacity" : 100,
"error_handlers" : [
{
"on" : "server_error",
"strategy" : "retry"
},
{
"on" : "client_error",
"strategy" : "discard"
}
],
"retry_times" : 5,
"event_ttl" : 10
}
If an HTTP client error occurs, then Data Orchestrator will try to resend the event up to 5 times. If there occurs an HTTP server error, then Data Orchestrator will do nothing. At most 100 events can be in the queue at any time; if more than 100 events are present in the queue, the oldest ones will be deleted (even if they were resent less than 5 times in the case of HTTP client errors). If any event lasts for longer than 10 second in the queue, it will be discarded.