public static boolean isRetryableException ( Exception exception ) { if ( exception == null ) { throw new IllegalArgumentException ( "exception cannot be null" ) ; } if ( exception instanceof ServiceBusException ) { return ( ( ServiceBusException ) exception ) . getIsTransient ( ) ; } return false ; }
Determines if an exception is retry - able or not . Only transient exceptions should be retried .