I am using the REFramework but I want to configure it to send email when a System Exception is encountered - but only if it’s done retrying (or not retrying at all) which is based on the configuration of the queue.
For example:
- Get Next Item from Queue - Transaction T1
- Transaction T1 encounters a System Exception
- Queue item Transaction T1 is marked as retried and a new (same) queue item is created to process later as the queue is configured to retry 2 times
- Repeat steps 1-3 until it gets to the queue item is actually a retry of Transaction T1
- After the 2nd retry and stills encounters a System Exception, this is when I want to send email. Not when it will still do a retry
Now how do I incorporate that logic within the REFramework? Thanks!