Questions tagged [vertx-verticle]

175 questions
2
votes
1 answer

Vertx Service Proxy Compilation error Cannot resolved to be a type

I am working with vertx service proxy. As I try to add all the required dependencies and package-info java file. I still get vertx compilation error cannot be resolved to a type. From tutorial I have learnt that it is a generated file but It does…
2
votes
1 answer

In Vert.x, why is the DEFAULT_EVENT_LOOP_POOL_SIZE = 2 * no. of cores?

Vert.x seems to create upto 2 * NUM_OF_CORES event loop threads by default. And this seems to be a fairly old change (7 years+) On a machine with 4 physical cores (8 logical cores with hyper-threading), it creates 16 event loop threads. Shouldn't…
mintuhouse
  • 449
  • 5
  • 16
2
votes
1 answer

Using Thymeleaf TemplateEngine with Vert.x 3.9

I am new to Vertx. I am trying to create thymeleaf template engine in my application but it raises this error java: incompatible types: io.vertx.core.Vertx cannot be converted to io.vertx.reactivex.core.Vertx and if I cast vertx to…
MAY
  • 667
  • 1
  • 6
  • 21
2
votes
2 answers

Vertx use uploaded images in html

I am able to upload files at the default location. router.route().handler( BodyHandler.create() .setBodyLimit(500 * KB) ); router.post("/admin/add").handler(adminActions::createNewItem); This body handler puts file in file-uploads. This…
Emma Rossignoli
  • 935
  • 7
  • 25
2
votes
1 answer

How to write Junit test case for start method of consumer Verticle in vert.x?

I have implemented one Verticle as mentioned below. Verticle is working as expected. Now I am trying to write Junit test case for this Verticle which could test the start method, the handler method handleRequest(), and the method getSomeData()…
Nags
  • 273
  • 1
  • 4
  • 16
2
votes
1 answer

Replacing JavaScript SockJS client with Java Vert.x client

I have a working server in java vertx and a client but in SockJS, i would like to make this client in java, how can i convert this to java: const EB_EVENT_TO_SERVER = "event.to.server"; const EB_EVENT_TO_CLIENT = "event.to.client."; const…
2
votes
1 answer

MDC logging in vertx

I was planning to use slf4j MDC in my rest application which is using vertx framework. I read somewhere that you shouldn't use MDC in vertx as MDC is thread specific and vertx is thread agnostic. But I am setting MDC variables at the start of a…
Sammy Pawar
  • 1,201
  • 3
  • 19
  • 38
2
votes
1 answer

Testing asynchronous Vertx and RxJava methods using mockito

I have a class which sends a message on the vert.x event bus, and then handles the reply from the event bus consumer. When the class runs, it calls methods on objects which are passed to it either in the constructor or specific method calls. In…
user1052610
  • 4,440
  • 13
  • 50
  • 101
2
votes
1 answer

Modules in Vert.X 3

I am new to Vert.X , I am interested in knowing how the module system is different in Vert.X 3 than 2 , I couldn't find any useful documentation for same.
Punit Goel
  • 59
  • 1
  • 6
2
votes
1 answer

In vert.x, why do static methods run before static code blocks?

I have a class ConfigFactory, it can give me some configuration from JSON files by vert.x conf modules. public class ConfigFactory { private static JsonObject result = new JsonObject(); static { ConfigStoreOptions fileStore = new…
EchoCow
  • 117
  • 1
  • 10
2
votes
0 answers

Vertx Clustered EventBus not receiving messages

I've two separate verticles in two projects which are packaged as regular jar. The verticles types is standard. The first verticle send message over a rest endpoint by eventbus.send method. The other verticle receive that message(actually should…
2
votes
1 answer

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

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…
techrhl
  • 434
  • 8
  • 19
2
votes
1 answer

Vert.x - differences between Verticles and Services

We started using vert.x few days ago. Reading the documentation (A gentle guide to asynchronous programming with Eclipse Vert.x for Java developer - https://vertx.io/docs/guide-for-java-devs/) i understood the verticle concept. What i didn't…
Reste85
  • 183
  • 1
  • 8
2
votes
1 answer

Vertx.io cluster and service discovery

I am playing with vertx.io, it looks great. Now I build up a cluster of three verticles (three simple java main fat jars). One verticle expose a web interface (a poorly rest api), the other two simply awares the web verticle that they are up or down…
Francesco
  • 1,742
  • 5
  • 44
  • 78
2
votes
1 answer

Vertx.deployVerticle does not call the supplied completion handler

I writing a service where a deployed verticle is linked to a rest endpoint. The service is working 100% (I dynamically deployed the verticle and calling the REST endpoint execute a function on the verticle). The problem is that the supplied…
davilj
  • 101
  • 2
  • 6
1
2
3
11 12