Reputation: 1251
I am trying to understand if the Rest Proxy solution can help me in my solution. I commented:
I'm trying to send an image from my frontend (react) in response to an event generated by the client of my application. That image was sent to a producer Kafka who will send his consumers to process it in several models of Machine Learning and return a response to that producer.
The flow:
Frontend (img) -> ApiRest (Spring Boot) -> Producer -> Consumers (Python) -> Return response to client.
I understand that I need Kafka to act as a request-response to return the response to that client who made the event.
I'm in the correct way?.
On the other hand, I want to know if there is any problem in using several consumers of different language (Java and Python) within the same topic.
Thank you,
Greetings.
Upvotes: 0
Views: 548
Reputation: 5279
Kafka rest proxy is useful when you have to produce data to a Kafka topic from a system which cannot use Kafka producer for whatever reason (e.g. no supporting producer available for that language or version).
But there is no way to receive response from your consumers in a synchronous way because Kafka producers and consumers are always asynchronous
Upvotes: 1