I have seen lots of examples in the internet spring cloud stream kafka. But most of them don't use it as a web application. It's just a application as a consumer. I want to know that, If i use the spring cloud stream kafka in my web application, is there any problem like concurrent problem like that? If it's not recommended, what is the reason for that. Thanks for your support 🙂
Yes, it's possible, and probably best used with WebFlux rather than MVC, where you wouldn't trick yourself into writting synchronous Kafka code around request-response semantics.
Otherwise, Kafka would act as a intermediate event bus saying "this request has made been made, return HTTP 202"
Don't expect to write a GET handler with a blocking Kafka Consumer polling