diff --git a/spring-kafka/src/main/java/org/springframework/kafka/listener/ContainerProperties.java b/spring-kafka/src/main/java/org/springframework/kafka/listener/ContainerProperties.java index 8135517f66..677322a810 100644 --- a/spring-kafka/src/main/java/org/springframework/kafka/listener/ContainerProperties.java +++ b/spring-kafka/src/main/java/org/springframework/kafka/listener/ContainerProperties.java @@ -798,7 +798,7 @@ public Duration getConsumerStartTimeout() { * @param consumerStartTimeout the consumer start timeout. */ public void setConsumerStartTimeout(Duration consumerStartTimeout) { - Assert.notNull(consumerStartTimeout, "'consumerStartTimout' cannot be null"); + Assert.notNull(consumerStartTimeout, "'consumerStartTimeout' cannot be null"); this.consumerStartTimeout = consumerStartTimeout; } diff --git a/spring-kafka/src/main/java/org/springframework/kafka/retrytopic/DefaultDestinationTopicResolver.java b/spring-kafka/src/main/java/org/springframework/kafka/retrytopic/DefaultDestinationTopicResolver.java index f1d9265fc8..311e6cbb68 100644 --- a/spring-kafka/src/main/java/org/springframework/kafka/retrytopic/DefaultDestinationTopicResolver.java +++ b/spring-kafka/src/main/java/org/springframework/kafka/retrytopic/DefaultDestinationTopicResolver.java @@ -104,7 +104,7 @@ public DestinationTopic resolveDestinationTopic(String mainListenerId, String to ? handleDltProcessingFailure(destinationTopicHolder, e) : destinationTopicHolder.getSourceDestination().shouldRetryOn(attempt, maybeUnwrapException(e)) && isNotFatalException(e) - && !isPastTimout(originalTimestamp, destinationTopicHolder) + && !isPastTimeout(originalTimestamp, destinationTopicHolder) ? resolveRetryDestination(mainListenerId, destinationTopicHolder, e) : getDltOrNoOpsDestination(mainListenerId, topic, e); } @@ -123,7 +123,7 @@ private Throwable maybeUnwrapException(@Nullable Throwable e) { .orElse(e); } - private boolean isPastTimout(long originalTimestamp, DestinationTopicHolder destinationTopicHolder) { + private boolean isPastTimeout(long originalTimestamp, DestinationTopicHolder destinationTopicHolder) { long timeout = destinationTopicHolder.getNextDestination().getDestinationTimeout(); return timeout != RetryTopicConstants.NOT_SET && Instant.now(this.clock).toEpochMilli() > originalTimestamp + timeout; diff --git a/spring-kafka/src/test/java/org/springframework/kafka/listener/KafkaMessageListenerContainerTests.java b/spring-kafka/src/test/java/org/springframework/kafka/listener/KafkaMessageListenerContainerTests.java index fd5be9e050..5a68613101 100644 --- a/spring-kafka/src/test/java/org/springframework/kafka/listener/KafkaMessageListenerContainerTests.java +++ b/spring-kafka/src/test/java/org/springframework/kafka/listener/KafkaMessageListenerContainerTests.java @@ -724,7 +724,7 @@ void testInOrderAck(AckMode ackMode) throws Exception { assertThat(illegal.get()).isNotNull(); } - private static Stream testInOrderAckPauseUntilAckedParamters() { + private static Stream testInOrderAckPauseUntilAckedParameters() { return Stream.of( Arguments.of(AckMode.MANUAL, false), Arguments.of(AckMode.MANUAL, true), @@ -733,7 +733,7 @@ private static Stream testInOrderAckPauseUntilAckedParamters() { } @ParameterizedTest(name = "{index} AckMode.{0} batch:{1}") - @MethodSource("testInOrderAckPauseUntilAckedParamters") + @MethodSource("testInOrderAckPauseUntilAckedParameters") @SuppressWarnings("unchecked") void testInOrderAckPauseUntilAcked(AckMode ackMode, boolean batch) throws Exception { ConsumerFactory cf = mock(ConsumerFactory.class); @@ -2491,7 +2491,7 @@ public void onPartitionsAssigned(Collection partitions) { } @Test - void enforceRabalanceOnTheConsumer() throws Exception { + void enforceRebalanceOnTheConsumer() throws Exception { ConsumerFactory cf = mock(); ContainerProperties containerProps = new ContainerProperties("enforce-rebalance-test-topic"); containerProps.setGroupId("grp"); diff --git a/spring-kafka/src/test/java/org/springframework/kafka/retrytopic/DefaultDestinationTopicResolverTests.java b/spring-kafka/src/test/java/org/springframework/kafka/retrytopic/DefaultDestinationTopicResolverTests.java index ff186ae304..382e579330 100644 --- a/spring-kafka/src/test/java/org/springframework/kafka/retrytopic/DefaultDestinationTopicResolverTests.java +++ b/spring-kafka/src/test/java/org/springframework/kafka/retrytopic/DefaultDestinationTopicResolverTests.java @@ -286,7 +286,7 @@ void shouldCloseContainerOnContextRefresh() { } @Test - void shouldNotMarkContainerRefeshedOnOtherContextRefresh() { + void shouldNotMarkContainerRefreshedOnOtherContextRefresh() { defaultDestinationTopicContainer .onApplicationEvent(new ContextRefreshedEvent(otherApplicationContext)); assertThat(defaultDestinationTopicContainer.isContextRefreshed()).isFalse(); diff --git a/spring-kafka/src/test/java/org/springframework/kafka/retrytopic/ListenerContainerFactoryResolverTests.java b/spring-kafka/src/test/java/org/springframework/kafka/retrytopic/ListenerContainerFactoryResolverTests.java index dc4648e189..d1cedb7afa 100644 --- a/spring-kafka/src/test/java/org/springframework/kafka/retrytopic/ListenerContainerFactoryResolverTests.java +++ b/spring-kafka/src/test/java/org/springframework/kafka/retrytopic/ListenerContainerFactoryResolverTests.java @@ -265,7 +265,7 @@ void shouldFailIfNoneResolvedForRetryEndpoint() { } @Test - void shouldGetFromCacheForMainEndpont() { + void shouldGetFromCacheForMainEndpoint() { // setup given(beanFactory.getBean(factoryName,