We are using Aiven as a Kafka as a Service provider, and they support credential rotation. E.g. every 24 hours.
So far, we have yet to find a way to create new consumers / producers in Spring Kafka when we need to rotate. Basically, a TopicAuthorizationException is thrown on consumer.poll
.
What we need to do, is basically create a new consumer with a update truststore and keystore path. Keystore and truststore is loaded from kubernetes secrets.
Anyone know how we can make this work?