Skip to content

Commit

Permalink
GH-2800: rename ExceptionBasedDestinationDlt to ExceptionBasedDltDest…
Browse files Browse the repository at this point in the history
…ination
  • Loading branch information
breader124 committed Dec 15, 2023
1 parent 4f27772 commit 19cd845
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.expression.spel.support.StandardEvaluationContext;
import org.springframework.kafka.core.KafkaOperations;
import org.springframework.kafka.retrytopic.ExceptionBasedDestinationDlt;
import org.springframework.kafka.retrytopic.ExceptionBasedDltDestination;
import org.springframework.kafka.retrytopic.ExceptionBasedDltRouting;
import org.springframework.kafka.retrytopic.RetryTopicBeanNames;
import org.springframework.kafka.retrytopic.RetryTopicConfiguration;
Expand Down Expand Up @@ -200,7 +200,7 @@ private SleepingBackOffPolicy<?> createBackoffFromAnnotation(Backoff backoff, Be

private Map<String, Set<Class<? extends Throwable>>> createDltRoutingSpecFromAnnotation(ExceptionBasedDltRouting routingSpec) {
return Arrays.stream(routingSpec.routingRules())
.collect(Collectors.toMap(ExceptionBasedDestinationDlt::suffix, excBasedDestDlt -> Set.of(excBasedDestDlt.exceptions())));
.collect(Collectors.toMap(ExceptionBasedDltDestination::suffix, excBasedDestDlt -> Set.of(excBasedDestDlt.exceptions())));
}

private EndpointHandlerMethod getDltProcessor(Method listenerMethod, Object bean) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @see org.springframework.kafka.retrytopic.ExceptionBasedDltRouting
* @since 3.2.0
*/
public @interface ExceptionBasedDestinationDlt {
public @interface ExceptionBasedDltDestination {

/**
* Suffix extension used when constructing the name for the new DLT. It is placed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* which might be thrown during the processing.
*
* @author Adrian Chlebosz
* @see org.springframework.kafka.retrytopic.ExceptionBasedDestinationDlt
* @see ExceptionBasedDltDestination
* @since 3.2.0
*/
public @interface ExceptionBasedDltRouting {
Expand All @@ -32,5 +32,5 @@
*
* @return configured routing
*/
ExceptionBasedDestinationDlt[] routingRules() default {};
ExceptionBasedDltDestination[] routingRules() default {};
}
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ static class RetryableTopicAnnotationFactoryWithCustomDltRouting {
@RetryableTopic(
attempts = "1",
exceptionBasedDltRouting = @ExceptionBasedDltRouting(routingRules = {
@ExceptionBasedDestinationDlt(
@ExceptionBasedDltDestination(
suffix = "-deserialization", exceptions = {DeserializationException.class}
)
})
Expand Down

0 comments on commit 19cd845

Please sign in to comment.