In one of my applications I want to use non-blocking retries while manually starting the @KafkaListener
as described here.
Adding an @EventListener
like this one:
@EventListener(ApplicationReadyEvent.class)
public void startKafkaListener() {
MessageListenerContainer listenerContainer = endpointRegistry.getListenerContainer(LISTENER_ID_FOO);
if (!listenerContainer.isRunning()) {
log.info("Listener not running - starting.");
listenerContainer.start();
}
}
seemed to do the trick, however now I am facing the following problem: once I disable the autoStartup
of my @KafkaListener
non-blocking retries seem to stop working.
I have created a sample project that shows this issue.
Am I missing some post-processing here that enables the retries?