Skip to content

RetryTopicConfigurationBuilder#includeTopics does not work with the List #2636

Closed Answered by garyrussell
hariraogotit asked this question in Q&A
Discussion options

You must be logged in to vote

This doesn't work for me with, or without, the includeTopics()...

@SpringBootApplication
public class Kgh2676Application {

	public static void main(String[] args) {
		SpringApplication.run(Kgh2676Application.class, args);
	}

	@KafkaListener(id = "kgh2676", topics = "${kgh2676}")
	void listen(String in) {
		System.out.println(in);
	}

	@Bean
	RetryTopicConfiguration myRetryTopic(KafkaTemplate<String, byte[]> kafkaTemplate,
										 @Value("${kgh2676}") String topic) {
		return RetryTopicConfigurationBuilder
				.newInstance()
				.includeTopics(List.of(topic))
				.exponentialBackoff(3000, 2, 100000)
				.maxAttempts(5)
				.retryTopicSuffix("-asl-nm.retry")
				.dltSuffix("-asl-nm.dlt")…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@garyrussell
Comment options

Answer selected by hariraogotit
Comment options

You must be logged in to vote
1 reply
@garyrussell
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants