retryableExceptions configuration and implementation
Most likely https://github.com/jhalterman/lyra/blob/ce347a69357fef1b34e92d92a4f9e68792d81255/src/main/java/net/jodah/lyra/internal/util/Exceptions.java#L46
should be
if (retryableExceptions.contains(e.getClass()) || e.getCause() instanceof EOFException)
, because retryableExceptions is a set of Classes not a set of exceptions. But actually retryableExceptions.contains(e) can be removed all together, because it is implicit covered by line 44
A more general suggestion of my would be to make recoverable exceptions more configurable. Let users provide predicates if exceptions are recoverable or not, because more often than not you have a whole exception cause chain. And only checking type of the outermost exception does not suffice.
The API could certainly support a Predicate to determine if a failure should be retryable, and the default predicate could match the retry exceptions list, which the user could still modify. If the user provides there own predicate, it would bypass the default one.
Predicate is a JDK 8 API and Lyra 0.5.x minimum JDK version is 1.6, so this would need to go into a major release, e.g. 1.x.
@acogoluegnes With 'Predicate' I meant a concept not the concrete jdk impl. So you can invent your own predicate if you like to be java 6 compatible.