Upgrade samples

This commit is contained in:
Gary Russell
2019-10-02 10:16:35 -04:00
committed by Artem Bilan
parent abdc1e136c
commit 0feba30e76
6 changed files with 22 additions and 13 deletions

View File

@@ -34,6 +34,7 @@ import org.springframework.kafka.support.converter.DefaultJackson2JavaTypeMapper
import org.springframework.kafka.support.converter.Jackson2JavaTypeMapper.TypePrecedence;
import org.springframework.kafka.support.converter.RecordMessageConverter;
import org.springframework.kafka.support.converter.StringJsonMessageConverter;
import org.springframework.util.backoff.FixedBackOff;
import com.common.Bar2;
import com.common.Foo2;
@@ -53,7 +54,7 @@ public class Application {
ConcurrentKafkaListenerContainerFactory<Object, Object> factory = new ConcurrentKafkaListenerContainerFactory<>();
configurer.configure(factory, kafkaConsumerFactory);
factory.setErrorHandler(new SeekToCurrentErrorHandler(
new DeadLetterPublishingRecoverer(template), 3));
new DeadLetterPublishingRecoverer(template), new FixedBackOff(0L, 2)));
return factory;
}