You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Rams N <99...@gmail.com> on 2017/04/09 03:49:05 UTC

Kafka producer and consumer within on sync execution

Hi,
I've an usecase to respond to an API call to the client which should happen
in sync. But within the api execution, the system A need to publish a kafka
message to an different system B and which responds to another kafka topic.
The response must be consumed by A and should respond to the client as API
response.

So, here this problem has a async pub-sub model and also API handling,
which is a sync.

Any suggestions on implementing this highly appreciated.

thanks
Rams

Re: Kafka producer and consumer within on sync execution

Posted by Hans Jespersen <ha...@confluent.io>.
You posted the same question to Stack Overflow so I answered it there 

https://stackoverflow.com/questions/43302857/handling-sync-api-call-rest-spring-and-async-message-kafka-in-the-same-execu/43312070#43312070 <https://stackoverflow.com/questions/43302857/handling-sync-api-call-rest-spring-and-async-message-kafka-in-the-same-execu/43312070#43312070>

-hans




> On Apr 8, 2017, at 8:49 PM, Rams N <99...@gmail.com> wrote:
> 
> Hi,
> I've an usecase to respond to an API call to the client which should happen
> in sync. But within the api execution, the system A need to publish a kafka
> message to an different system B and which responds to another kafka topic.
> The response must be consumed by A and should respond to the client as API
> response.
> 
> So, here this problem has a async pub-sub model and also API handling,
> which is a sync.
> 
> Any suggestions on implementing this highly appreciated.
> 
> thanks
> Rams