-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment Variable KAFKA_BOOTSTRAP_SERVERS not being read by smallrye client #7791
Comments
@ricardozanini Hi, Would it be possible to provide a minimum reproducer (no Infinispan for example :))? |
FWIW, I was unable to reproduce this issue in our Kafka integration test (https://github.com/quarkusio/quarkus/blob/master/integration-tests/kafka/pom.xml) I basically clear out
Everything worked as expected. Note that this was with Quarkus master. @ricardozanini any chance you can check your project with |
@geoand sure thing, will work on a simpler reproducer and will get back to you soon. |
@geoand I can confirm that this is not working on 1.3.0.CR2 either and I think I've found the problem. I've disabled the Infinispan integration. Steps to reproduce:
The application.properties file contains: mp.messaging.outgoing.kogito-processinstances-events.bootstrap.servers=
(...)
mp.messaging.outgoing.kogito-usertaskinstances-events.bootstrap.servers= If we delete them it works. I wonder if is this the expected behavior? I mean, since those are empty, the client could take into account the env property instead as a fallback. |
Well, I don't think it should fallback to |
I will add that in native mode, |
You can setup the broker location using: |
@cescoffier that's the point. We are setting the broker location with We should get rid of them and use only |
Sorry, just coming back to this issue. The priority is channel first, then the global value (because you can have multiple Kafka brokers). What we can do is to check if the value is empty and in that case use the global one. That would fix your issue. I've created smallrye/smallrye-reactive-messaging#649 to track this. It's an easy fix. |
Thank you @cescoffier! |
Actually, I believe it's already fixed. I've the following properties:
The first channel uses a "blank" My broker runs on 9093 (while the default is 9092). I tried:
All these configurations work. Can you recheck with the latest release? Maybe I miss something obvious. |
Hi @cescoffier , we've just upgraded our services to Quarkus 1.6 and it works fine. Thank you very much! |
Thanks @r00ta and @cescoffier, I'm closing this one for now. :) |
Hi!
Describe the bug
As stated by the docs, now we have the property
kafka.boostrap.servers
that can be set and it should be applied as the connection property to every Kafka connector within the application.That said, we injected the
KAFKA_BOOTSTRAP_SERVERS
environment variable into our containers, without explicit setting it in theapplication.properties
file. The application fails with:Expected behavior
That the environment variable
KAFKA_BOOTSTRAP_SERVERS
is being read by the application even if it's not defined in theapplication.properties
file.Actual behavior
The variable is ignored.
To Reproduce
Steps to reproduce the behavior:
*.bootstrap.servers
in theapplication.properties
fileKAFKA_BOOTSTRAP_SERVERS
and set it with the actual location of the Kafka server (you can use Spotify's docker image in a different forward port for this test)Configuration
Environment (please complete the following information):
Output of
uname -a
orver
:Linux skywalker 5.5.8-100.fc30.x86_64 Switch to the Maven distributed copy of the SubstrateVM annotations #1 SMP Thu Mar 5 21:55:51 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
:openjdk version "1.8.0_232"
OpenJDK Runtime Environment (build 1.8.0_232-20191008104205.buildslave.jdk8u-src-tar--b07)
OpenJDK 64-Bit GraalVM CE 19.2.1 (build 25.232-b07-jvmci-19.2-b03, mixed mode)
GraalVM version (if different from Java):
Quarkus version or git rev: 1.3.0.Alpha2
Build tool (ie. output of
mvnw --version
orgradlew --version
):Apache Maven 3.5.4 (Red Hat 3.5.4-5)
Additional context
We already had a similar problem before: #5708
This one might be related: #4571
Many thanks!
The text was updated successfully, but these errors were encountered: