Skip to content

RetryTopicConfiguration not working for multiple cluster #2719

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

You must be logged in to vote

The topic creation logic simply adds NewTopic beans to the application context; these beans are picked up by the KafkaAdmin bean (presumably the one configured by Boot since you don't have any).

I would expect both topics to be created in just one cluster, not both; logs should help you understand what is happening.

You really need two KafkaAdmin beans, one for each cluster, with some filtering logic to only declare a subset of the topics in each cluster.

Unfortunately, the KafkaAdmin is not really designed for subclassing like that. We could make it easier to do that, but it will require changes.

In the meantime, you should set spring.kafka.admin.auto-create to false (or simply disable a…

Replies: 2 comments 4 replies

Comment options

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

@hariraogotit
Comment options

@garyrussell
Comment options

@hariraogotit
Comment options

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