All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.synadia.jnats.extension.RetryObserver Maven / Gradle / Ivy

There is a newer version: 0.2.0
Show newest version
// Copyright (c) 2024 Synadia Communications Inc. All Rights Reserved.
// See LICENSE and NOTICE file for details.

package io.synadia.jnats.extension;

/**
 * The RetryObserver gives an opportunity to inspect an exception
 * and optionally stop retries before the retry config is exhausted
 */
public interface RetryObserver {
    /**
     * Inspect the exception to determine if the execute should retry.
     * @param e the exception that occurred when executing the action.
     * @return true if the execution should retry (assuming that the retry config is not exhausted)
     */
    boolean shouldRetry(Exception e);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy