You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Sigalit Eliazov <e....@gmail.com> on 2021/11/02 17:54:03 UTC

Globalktable usage in a multi microservices application

we have 2 microservices:

responsible for consuming message and update a globalKtable with
configuration information (key=id, value=myObject)

once it is activated with some id as an input it should look into the
configuration globalKtable and retrieve data by that id

how is it possible to access that globalktable from app2. should a RPC
layer needs to added to retrieve the info or KStream has some other
capabilities?

Thanks

Re: Globalktable usage in a multi microservices application

Posted by Vincent Maurin <vi...@gmail.com>.
Hello

The idea behind a GlobalKTable is to materiliaze data (a kafka topic) 
close from where it is used. Actually, each task/worker will materialize 
the full GlobalKTable in order to use it. So in your scenario, what 
should be shared between your services is ideally the Kafka topic used 
to build the GlobalKTable.

Then, if you want your app2 to be independent from Kafka, and only 
dependent on a RPC endpoint, you must develop your own endpoint 
"serving" the GlobalKTable

Best,

Vincent

On 02/11/2021 18:54, Sigalit Eliazov wrote:
> we have 2 microservices:
>
> responsible for consuming message and update a globalKtable with
> configuration information (key=id, value=myObject)
>
> once it is activated with some id as an input it should look into the
> configuration globalKtable and retrieve data by that id
>
> how is it possible to access that globalktable from app2. should a RPC
> layer needs to added to retrieve the info or KStream has some other
> capabilities?
>
> Thanks
>