Replies: 4 comments 1 reply
-
/cc @alesj (kafka), @cescoffier (kafka), @ozangunalp (kafka) |
Beta Was this translation helpful? Give feedback.
-
I guess What if you grab an instance of Config ( |
Beta Was this translation helpful? Give feedback.
-
What if you add your own ConfigSource -- via services/ -- which is after the ConfigSource which gathers QTRLM::start props ..., @geoand @cescoffier @stuartwdouglas ... any other idea? |
Beta Was this translation helpful? Give feedback.
-
If the interceptor is part of library that has no knowledge of Quarkus, I would propose providing an SPI that would implemented on the Quarkus application in order to pull properties from Quarkus and make them available to the library |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
I have a reasonably simple Kafka interceptor - a pojo implementation of
ProducerInterceptor<K,V>
. Its job will be to send a message to another application over HTTP. However, the interceptor needs to know where the listening application is - hostname and port.This can be configured through the
application.properties
file, eg:mp.messaging.<name>.responses.interceptor.myHostName=localhost
mp.messaging.<name>.responses.interceptor.myPort=9001
The properties get passed in to the interceptor through the
public void configure(Map<String, ?> map)
method.However, when my @QuarkusTest starts up, it uses a
QuarkusTestResourceLifecycleManager
to start-up a docker container - this will be the app listening. Whilst this is still on localhost, it is on a dynamic port.Any ideas how I can configure things so that the Kafka interceptor can get hold of that?! I can wire in the values from the
QuarkusTestResourceLifecycleManager
into theQuarkusTest
, but how can I set an ENV VAR or property so the interceptor can get it?Beta Was this translation helpful? Give feedback.
All reactions