Skip to content

is it possible to natively configure a single DLT topic for all failures? #2238

Answered by tomazfernandes
Watlas asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Watlas, thanks for bringing this up. This is not a feature the framework currently offers, but there's a workaround that might achieve the result you're looking for.

You can provide a custom RetryTopicNamesProviderFactory and override the getTopicName method when the topic is a DLT., such as:

@Bean
public RetryTopicNamesProviderFactory providerFactory() {
	return new SuffixingRetryTopicNamesProviderFactory() {
		@Override
		public RetryTopicNamesProvider createRetryTopicNamesProvider(DestinationTopic.Properties properties) {
			if (properties.isDltTopic()) {
				return new SuffixingRetryTopicNamesProvider(properties) {
					@Override
					public String getTopicName(String topic) {
						

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Watlas
Comment options

@tomazfernandes
Comment options

Answer selected by Watlas
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