Skip to content

Commit

Permalink
Add another producer auto resolution scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
vahidhashemian committed Jan 31, 2025
1 parent d3e666e commit 06b8280
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.apache.kafka.common.errors.InterruptException;
import org.apache.kafka.common.errors.InvalidOffsetException;
import org.apache.kafka.common.errors.NotLeaderForPartitionException;
import org.apache.kafka.common.errors.NotLeaderOrFollowerException;
import org.apache.kafka.common.errors.ProducerFencedException;
import org.apache.kafka.common.errors.SerializationException;
import org.apache.kafka.common.errors.SslAuthenticationException;
Expand Down Expand Up @@ -248,6 +249,14 @@ ImmutableMap.<Class<? extends Exception>, Map<String, PscErrorHandler.ProducerAc
}}
)

// NotLeaderOrFollowerException
.put(
NotLeaderOrFollowerException.class,
new LinkedHashMap<String, PscErrorHandler.ProducerAction>(1) {{
put("", new PscErrorHandler.ProducerAction(PscErrorHandler.ActionType.RESET_THEN_THROW, ProducerException.class));
}}
)

// ProducerFencedException
.put(
ProducerFencedException.class,
Expand Down

0 comments on commit 06b8280

Please sign in to comment.