vert.x

Vertx JDBC how it works under the hood

孤人 提交于 2020-02-03 11:37:08
问题 I have been using Vertx for 3 month, but now I wonder how non blocking Vertx JDBC works,for example private void selectEndedMatches(){ this.jdbcClient.getConnection(conn->{ if(conn.failed()){ log.error("Can't get Vertx connection",conn.cause()); } else{ final SQLConnection connection = conn.result(); connection.queryWithParams("select matchid from get5_stats_matches where matchid > ? and end_time is not null",new JsonArray().add(this.lastMatchId),this::endedMatches); connection.close(); } });

Prometheus metrics - not found

℡╲_俬逩灬. 提交于 2020-02-03 08:25:07
问题 I have spring boot application and i am using vertx. I want to monitor the services and the jvm and for that i chose Prometheus. This is my MonitoringConfig class: @Configuration public class MonitoringConfig { @Bean SpringBootMetricsCollector springBootMetricsCollector(Collection<PublicMetrics> publicMetrics) { SpringBootMetricsCollector springBootMetricsCollector = new SpringBootMetricsCollector(publicMetrics); springBootMetricsCollector.register(); return springBootMetricsCollector; }

How can I get the HOCON configuration file format to work in Vert.x deployed as fat jar?

旧城冷巷雨未停 提交于 2020-01-25 09:46:13
问题 I want to use the HOCON format for configuration in a Vert.x application deployed as a fat jar. I'm facing the same issue as described in this similar question. However I applied the gradle Plugin "io.vertx.vertx-plugin" (v1.0.1) and succeeded in getting the line io.vertx.config.hocon.HoconProcessor into META-INF/services/io.vertx.config.spi.ConfigProcessor in the jar. I still get the exception. What else could be required for the proper bundling of the HoconProcessor class in the jar? 来源:

No ParameterResolver registered for parameter [io.vertx.ext.unit.TestContext arg0]

我的梦境 提交于 2020-01-25 08:33:05
问题 I am trying to write a test case for vertx related stuff. Here is my code import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.runner.RunWith; import io.vertx.core.Vertx; import io.vertx.core.http.HttpClient; import io.vertx.core.http.HttpServer; import io.vertx.ext.unit.Async; import io.vertx.ext.unit.TestContext; import io.vertx.ext.unit.junit.VertxUnitRunner; @RunWith(VertxUnitRunner.class) public class

java.net.UnknownHostException: failed to resolve 'inventory-microservice'. Exceeded max queries per resolve 3

♀尐吖头ヾ 提交于 2020-01-24 13:18:16
问题 i am trying to run the following vertx tutorial but stuck on this exception. http://www.sczyh30.com/vertx-blueprint-microservice/index.html i have tried to run just single service or the whole project the exception is coming the same. any docker setting i am missing? ov 03, 2016 10:35:55 PM io.vertx.core.impl.launcher.commands.VertxIsolatedDeployer cache-infrastructure_1 | INFO: Succeeded in deploying verticle inventory-microservice_1 | java.net.UnknownHostException: failed to resolve

java.net.UnknownHostException: failed to resolve 'inventory-microservice'. Exceeded max queries per resolve 3

眉间皱痕 提交于 2020-01-24 13:15:14
问题 i am trying to run the following vertx tutorial but stuck on this exception. http://www.sczyh30.com/vertx-blueprint-microservice/index.html i have tried to run just single service or the whole project the exception is coming the same. any docker setting i am missing? ov 03, 2016 10:35:55 PM io.vertx.core.impl.launcher.commands.VertxIsolatedDeployer cache-infrastructure_1 | INFO: Succeeded in deploying verticle inventory-microservice_1 | java.net.UnknownHostException: failed to resolve

Bridging messages from eventbus to subscribed websocket clients using VertX

扶醉桌前 提交于 2020-01-07 03:08:09
问题 I'm trying to use websocket to create a publish-suscribe model which can be reached through both SockJS and Websocket (for Javascript clients on one side, and for Java clients on the other. Currently I'm able to subscribe using SockJS and Javascript clients. However, when trying to use websocket to receive messages in my Java client, I am able to connect to the websocket server, but don't receive any messages from the server. My current client code: public class

vert.x getting - failed to create a child event loop

烂漫一生 提交于 2020-01-04 05:35:13
问题 I am creating about 150 files of around 5MB sizes. Vertx file APIs gives an exception randomly after creating 10-15 files "failed to create a child event loop". (I am using vertx3 and java8) Below is my code snippet (After I get a callback then only I call the function again to create the next file. So, file creation is never concurrent): Vertx.vertx().fileSystem().writeFile(filepath, Buffer.buffer(dataList.toString()), result -> { if (result.succeeded()) { System.out.println("File written");

I have a Vertx request and I need to calculate an externally visible (public) URL

那年仲夏 提交于 2020-01-03 13:41:07
问题 I am using Vertx 3 with Kotlin, and at times I need to return a specific URI from the perspective of the public URL which is not the same as what the Vertx-web request thinks my URL is. This is likely due to my load balancer or proxy receiving one URL, and then forwarding to my application on an internal URL. So if I do this: val publicUrl = context.request().absoluteURI() I end up with a URL like http://10.10.103.22:8080/some/page instead of https://app.mydomain.com/some/page . Everything is

Node.js or Vert.x for Push Notifications

﹥>﹥吖頭↗ 提交于 2020-01-03 03:20:08
问题 I have this java application where the server needs to send push notifications to the client every one second. I am using the HTML5 server sent events to accomplish the one-way communication from the server to the client. However, I am expecting >1000 client connections (which will surely increase) at any point in time connecting to the server to get updates. The duration of these updates may run into 30 mins also. I have read that under such situations when using simple html5 server-sent