Skip to content

Distinct concurrency for retry and DLT topic containers #2434

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

You must be logged in to vote

Here is a work around, until we can address this:

@SpringBootApplication
public class Kgh2434Application {

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

	@KafkaListener(id = "kgh2434", topics = "kgh2434", concurrency = "1", autoStartup = "false")
	@RetryableTopic
	void listen(String in) {
		System.out.println(in);
	}

	@Bean
	ApplicationRunner runner(KafkaListenerEndpointRegistry registry) {
		return args -> {
			((ConcurrentMessageListenerContainer<?, ?>) registry.getListenerContainer("kgh2434")).setConcurrency(6);
			registry.start();
		};
	}

}

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@garyrussell
Comment options

@jgslima
Comment options

@garyrussell
Comment options

@nkalra0123
Comment options

@garyrussell
Comment options

Answer selected by jgslima
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants