7272 */
7373@ SpringJUnitConfig
7474@ DirtiesContext
75- @ EmbeddedKafka (topics = { RetryableTopicIntegrationTests .FIRST_TOPIC ,
76- RetryableTopicIntegrationTests .SECOND_TOPIC ,
77- RetryableTopicIntegrationTests .THIRD_TOPIC ,
78- RetryableTopicIntegrationTests .FOURTH_TOPIC }, partitions = 1 )
75+ @ EmbeddedKafka (topics = { RetryTopicIntegrationTests .FIRST_TOPIC ,
76+ RetryTopicIntegrationTests .SECOND_TOPIC ,
77+ RetryTopicIntegrationTests .THIRD_TOPIC ,
78+ RetryTopicIntegrationTests .FOURTH_TOPIC }, partitions = 1 )
7979@ TestPropertySource (properties = "five.attempts=5" )
80- public class RetryableTopicIntegrationTests {
80+ public class RetryTopicIntegrationTests {
8181
82- private static final Logger logger = LoggerFactory .getLogger (RetryableTopicIntegrationTests .class );
82+ private static final Logger logger = LoggerFactory .getLogger (RetryTopicIntegrationTests .class );
8383
8484 public final static String FIRST_TOPIC = "myRetryTopic1" ;
8585
@@ -183,7 +183,7 @@ static class ThirdTopicListener {
183183 CountDownLatchContainer container ;
184184
185185 @ RetryableTopic (attempts = "${five.attempts}" ,
186- backoff = @ Backoff (delay = 70 , maxDelay = 120 , multiplier = 1.5 ),
186+ backoff = @ Backoff (delay = 250 , maxDelay = 1000 , multiplier = 1.5 ),
187187 numPartitions = "#{3}" ,
188188 timeout = "${missing.property:2000}" ,
189189 include = MyRetryException .class , kafkaTemplate = "kafkaTemplate" )
@@ -207,7 +207,7 @@ static class FourthTopicListener {
207207 @ Autowired
208208 CountDownLatchContainer container ;
209209
210- @ RetryableTopic (dltStrategy = DltStrategy .NO_DLT , attempts = "4" , backoff = @ Backoff (50 ),
210+ @ RetryableTopic (dltStrategy = DltStrategy .NO_DLT , attempts = "4" , backoff = @ Backoff (300 ),
211211 kafkaTemplate = "kafkaTemplate" )
212212 @ KafkaListener (topics = FOURTH_TOPIC , containerFactory = MAIN_TOPIC_CONTAINER_FACTORY )
213213 public void listenNoDlt (String message , @ Header (KafkaHeaders .RECEIVED_TOPIC ) String receivedTopic ) {
@@ -320,7 +320,7 @@ public RetryTopicConfiguration firstRetryTopic(KafkaTemplate<String, String> tem
320320 public RetryTopicConfiguration secondRetryTopic (KafkaTemplate <String , String > template ) {
321321 return RetryTopicConfigurationBuilder
322322 .newInstance ()
323- .exponentialBackoff (50 , 2 , 10000 )
323+ .exponentialBackoff (500 , 2 , 10000 )
324324 .retryOn (Arrays .asList (IllegalStateException .class , IllegalAccessException .class ))
325325 .traversingCauses ()
326326 .includeTopic (SECOND_TOPIC )
@@ -344,7 +344,6 @@ public ThirdTopicListener thirdTopicListener() {
344344 return new ThirdTopicListener ();
345345 }
346346
347-
348347 @ Bean
349348 public FourthTopicListener fourthTopicListener () {
350349 return new FourthTopicListener ();
@@ -482,10 +481,6 @@ public ConcurrentKafkaListenerContainerFactory<String, String> kafkaListenerCont
482481 ConsumerFactory <String , String > consumerFactory ) {
483482
484483 ConcurrentKafkaListenerContainerFactory <String , String > factory = new ConcurrentKafkaListenerContainerFactory <>();
485- ContainerProperties props = factory .getContainerProperties ();
486- props .setIdleEventInterval (100L );
487- props .setPollTimeout (50L );
488- props .setIdlePartitionEventInterval (100L );
489484 factory .setConsumerFactory (consumerFactory );
490485 factory .setConcurrency (1 );
491486 return factory ;
0 commit comments