Comments (6)
the problem happens with keep-alive.
what is the code creating the HttpClient ?
from vertx-config.
does it happen inside the same verticle or from a main/test method ?
from vertx-config.
does it happen inside the same verticle or from a main/test method ?
It happens from a test methods but there is issue in vertx-consul-client
with the same problem.
I made some experiments with ConsulConfigStoreTest:
@Test
public void getSimpleConfig(TestContext tc) {
Async async = tc.async();
createRetriever();
System.out.println(Vertx.currentContext()); // (1)
client.putValue("foo/bar", "value", ar -> {
System.out.println(Vertx.currentContext()); // (2)
tc.assertTrue(ar.succeeded());
retriever.getConfig(json2 -> {
System.out.println(Vertx.currentContext()); // (3)
assertThat(json2.succeeded()).isTrue();
JsonObject config2 = json2.result();
tc.assertTrue(!config2.isEmpty());
tc.assertEquals(config2.getString("bar"), "value");
client.deleteValues("foo", h -> async.complete());
});
});
}
If I run the test by executing the entire class, I see the above warning and:
mvn test -Dtest=ConsulConfigStoreTest
(1) null
WARNING: Reusing a connection with a different context: an HttpClient is probably shared between different Verticles
(2) io.vertx.core.impl.EventLoopContext@1ba3412b
(3) io.vertx.core.impl.EventLoopContext@37c2490c
WARNING: Reusing a connection with a different context: an HttpClient is probably shared between different Verticles
But if I run the getSimpleConfig
test only, then I see no warnings and:
mvn test -Dtest=ConsulConfigStoreTest#getSimpleConfig
(1) null
(2) io.vertx.core.impl.EventLoopContext@512f413d
(2) io.vertx.core.impl.EventLoopContext@512f413d
@vietj @cescoffier any thoughts on this?
from vertx-config.
I think the best would be to capture a Context in consul client when it is created and then use runOnContext to use the HttpClient.
from vertx-config.
I'm not sure it should be done in the consul client or in the config store. For vault I'm doing it in the config store.
from vertx-config.
Thank you guys. Due to the issues not belongs to vertx-config
, I decided to make all the changes in the parent project
from vertx-config.
Related Issues (20)
- java.lang.IllegalArgumentException: unknown configuration store implementation: spring-config-server HOT 1
- Sometimes VaultConfigStoreTestBase#testWithRevokedRootToken fail HOT 2
- ConfigRetriever uses data type double for Integer env values HOT 1
- Invalid docs for ConfigRetriever HOT 2
- ConfigRetriever possibly responsible for 'Multi threaded access request' failures HOT 4
- Update to typesafe config 1.3.4
- ConfigRetriever doesn't load properties file + small typo in factory name HOT 9
- config().getString is not perfect HOT 8
- Allow hierarchical parsing for system properties
- Allow hierarchical parsing of properties files in directory config store
- JavaScript, Kotlin, Groovy and Ruby config documentation not available HOT 1
- Support for kubernetes as a vault auth backend
- Vertx 4.2.1 Redis ConfigReader issue
- support CONFIG_FORCE_ environment variables with HOCON config file format HOT 1
- Update Doc relate to additional formats or move implementations to core-lib META-INF/services HOT 2
- Feature request: Support for POST in HTTP Config Retriever
- Config retriever doesn't get config for spring-cloud-config with HTTPS HOT 4
- Cannot read config file when upgrading to 4.3.3 HOT 4
- Remove databind use vault
- Updating Snakeyaml to v2 has a breaking API HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vertx-config.