1

I have a query on sharing of state-stores. Do the applications, should have it's local state-store to exchange meta-data?

I mean, let's assume there are 2 appliations, one application process data published to a topic to it's local state-store and the other application, to exposing APIs to access the data. As part of the second application, stream builder adds state-store to it's topology. Would this be possible by defining application.server in the stream configuration?

Also when we define application.server property for streaming applications, what is the port number, it is any randon number to provide. From the documentation, "host1:4460", "host5:5307" and "host3:4777", these numers stands for what?

Thanks

Venkata Madhu
  • 93
  • 1
  • 14
  • Not sure if I fully understand the question, however note, if you specify `application.server` it would only propagate this information to other instances of the same application. It won' open a port -- you need to implement this part yourself. Check out the docs and example for more detail: https://kafka.apache.org/25/documentation/streams/developer-guide/interactive-queries.html#querying-remote-state-stores-for-the-entire-app -- there is also a talk about IQ: https://www.confluent.io/kafka-summit-sf17/Interactive-Queries-in-Kafka-Streams-API – Matthias J. Sax Aug 05 '20 at 05:08
  • Got it, Thanks. But when metadataForKey was able to identify the key available in other instances (if it is not available in current instance), why it was not able to get value, and why we need to construct RPC call to that instance to get details? – Venkata Madhu Aug 07 '20 at 10:04
  • Well, the computation if the key is local or remote is done locally only -- the passed in lookup key is forwarded to the partitioner and if the returned partitioned number does not match the local task number, we know that the key is somewhere else. -- Ie, we don't do a lookup into any store to figure out if the key is local or remote -- it's purely based on metadata. – Matthias J. Sax Aug 07 '20 at 20:58

0 Answers0