mirror of
				https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
				synced 2025-11-03 20:18:06 +00:00 
			
		
		
		
	Added ActionTerminatedException to BackoffPerformer
This commit is contained in:
		@@ -134,6 +134,14 @@ private:
 | 
			
		||||
    Error error_;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Backoff performer has no more retries left for a specific action.
 | 
			
		||||
 */
 | 
			
		||||
class CPPKAFKA_API ActionTerminatedException : public Exception {
 | 
			
		||||
public:
 | 
			
		||||
    ActionTerminatedException(const std::string& error);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
} // cppkafka
 | 
			
		||||
 | 
			
		||||
#endif // CPPKAFKA_EXCEPTIONS_H
 | 
			
		||||
 
 | 
			
		||||
@@ -136,7 +136,7 @@ public:
 | 
			
		||||
            backoff = increase_backoff(backoff);
 | 
			
		||||
        }
 | 
			
		||||
        // No more retries left or we have a terminal error.
 | 
			
		||||
        throw Exception("Commit failed: no more retries.");
 | 
			
		||||
        throw ActionTerminatedException("Commit failed: no more retries.");
 | 
			
		||||
    }
 | 
			
		||||
private:
 | 
			
		||||
    TimeUnit increase_backoff(TimeUnit backoff);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user