What happens to the publishable document after it is picked up by its trigger and corresponding processing service associated with the trigger fails? Does the publishable document vanish totally?
Is there a way to retain the publishable document in the event of failure in the same queue(rollback) or in a backout queue? Does the broker has any inbuilt functionality? This will help me to automate error handling of transient failures.
If the associated processing service fails, can the broker automatically put the publishable document to a backout/error queue? What does it take to accomplish this task?
What happens to the published document depends on how the trigger service fails. You can force a rollback by calling throwExceptionForRetry. This causes IS to “nack” the document so that it remains on the Broker for a retry, perhaps by another IS instance if there are multiple IS instances connected to the queue.
What you can do is have a try-catch block in your Flow service that catches all exceptions and determines if the error is “retriable.” If it is, then invoke pub.flow:throwExceptionForRetry (outside the catch block.)