quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.79k stars 2.68k forks source link

Improve support for Kafka Streams interactive queries #10064

Open rquinio opened 4 years ago

rquinio commented 4 years ago

Description

The idea would be to industrialize the support of Kafka Streams interactive queries when "querying remote state stores for the entire app".

This was discussed in https://github.com/quarkusio/quarkus-quickstarts/pull/578 , as the quickstart demonstrates interactive queries, but it's not very test-friendly and requires some boilerplate config.

Implementation ideas

It looks like the extension could pre-configure quarkus.kafka-streams.application-server to ${hostname}:${quarkus.http.port}, if a quarkus http extension ("RPC endpoint") is also present.

Relying on the presence of a HOSTNAME env variable is not cross-platform, so it might be necessary to determine it programmatically via Java INetAddress APIs (similar to https://github.com/quarkusio/quarkus/blob/e50393a3cb37a2a444210160fc88c953e81da55d/core/runtime/src/main/java/io/quarkus/runtime/logging/LoggingSetupRecorder.java#L328 )

quarkusbot commented 4 years ago

/cc @gunnarmorling

gunnarmorling commented 4 years ago

Yes, definitely a good improvement; I also wasn't happy about the HOSTNAME requirement, but I wasn't aware of that getQualifiedHostName() functionality. Makes absolutely sense to default to that. Would you like to send a PR for it?

rquinio commented 4 years ago

@gunnarmorling Not at the moment, as I'll be focusing first on other pending PRs/issues. This might be a good first issue for anyone familiar with KStreams interactive queries.

mcserra commented 4 years ago

Hi. Can i pick this one?

gunnarmorling commented 4 years ago

Hi. Can i pick this one?

Absolutely, go for it.

ejba commented 4 years ago

Hi everyone,

the property mentioned by @rquinio is an Optional at the moment link. Once this property will have a default value, the Optional part is not necessary any more and @mcserra could remove it.

What do you think?

rquinio commented 4 years ago

@ejba The problem is that the default value needs to be resolved programmatically, which happens after any mandatory/optional config is validated.

alesj commented 2 years ago

Can this issue be closed?

gsmet commented 1 year ago

@alesj not sure. There was a tentative to fix it here: https://github.com/quarkusio/quarkus/pull/10326 but I just closed it as it was never finalized.