I have a spring boot application which has a couple of kafka consumer beans, and a couple of kafka producer beans. Then I needed to wire a producer to the consumer, as I needed to produce a different message after consuming the incoming message. The server failed to start citing cyclic dependency.
The fix was to add @Lazy annotation on the producer bean that I had added as a dependency to the consumer bean. The server did start up fine with that, and I was able to produce the second message after consuming the first.