2
1
0

How to catch the error in delivery and mark the delivery as "Undelivered". So that it should not retry the delivery.

For one of my Receipt render service it throws timeout error sometimes and I want the delivery with same error to stop immediately from retrying. SO that it should not impact the server performance.

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi Ankit, would the following result from your delivery service do the trick?

      Fluent SDK

      return new DeliveryResultBuilder() 
           
      .setMaxDeliveryAttempts(1) 
           
      .setMessage("Render receipt timeout")
           
      .setStatus("Error") 
           
      .build()

      The transaction should stay in the Error delivery status however no delivery retry should occur (my guess). Maybe try to use

           .setMaxDeliveryAttempts(0)

      Generally, you dont want to set the transaction to the Undeliverable delivery status as that failure might never be picked up. If it stays in the Error status, it'l be picked up as part of the delivery error submissions alert email.

      See more details here

      1. Ankit Chauhan

        Thanks Miro, I have tried the same solution but still it keeps on trying when error occurs. Also I have analyzed that the attempt behavior is similar as mentioned for render receipt below somewhere in documentation.

        Still not sure if adding the delivery service in background will work for Render receipt or not. Or need to find some other solution.

      CommentAdd your comment...