Questions tagged [vert.x]

Vert.x is an event driven toolkit that runs on the JVM allowing the development of asynchronous web applications in Java, Javascript, Scala, Ruby, Ceylon, Kotlin and Groovy.

Vert.x is a polyglot event driven non-blocking toolkit that runs on the JVM - a run-time with real concurrency and unrivalled performance. Vert.x then exposes the API in , , , , , and . So you choose what language you want to use and you can even mix and match different languages. It can be used to create microservices, and can also be embedded.

Vert.x has also a powerful module system so you can package your Vert.x components into modules for encapsulation and reuse or even publishing them for the community.

Vert.x can be used as your base application stack from the ground up, but also can be embedded as a dependency of an existing application.

The framework also bundle a host of goodies out-of-the-box including a distributed event bus, , , a persistor and many other features so you can write real applications from the set-off. The event bus can be accessed using protocol, and various third party libraries exists to do so for several languages (, , , , , ...). A library called eventbus-client.js can also be used in client Javascript code.

2596 questions
9
votes
3 answers

How to block thread to wait for response in vert.x?

I have a situation where I call an external API A and use its response to feed to request of API B and call it and afterwards return the response to caller of API A. Something like below method(){ response = call API A } …
tausif
  • 672
  • 1
  • 6
  • 15
9
votes
2 answers

How vert.x is single threaded?

From my understanding, each vert.x instance will be assigned an event loop. Event loop handles all the request an other task for that particular instance. Event loop is a thread, I think. When there are multiple vert.x instance deployed, each…
8
votes
1 answer

How to change kapt plugin generate output dir path?

I try to use kapt and vertx-Codegen to generate my service.But the output path is /build/generated/source/kapt/main/. I want /src/main/generated/. Config the build.gradle.kts,I find generate adoc to /src/main/generated/,but other files no…
EchoCow
  • 163
  • 8
8
votes
1 answer

what is Future?

I have following code snippet. import io.vertx.core.Future; public void start(Future fut){ /* some code */ fut.complete() } Why does Future used here?
Satish_Mhetre
  • 192
  • 1
  • 2
  • 17
8
votes
2 answers

Mocking a Vertx.io async handler

when I was sync I wrote unit tests mocking the persistence part and check the caller's behavior. Here is an example about what I usually did: @Mock private OfferPersistenceServiceImpl persistenceService; @Inject @InjectMocks private OfferServiceImpl…
Francesco
  • 1,742
  • 5
  • 44
  • 78
8
votes
1 answer

Generate OpenAPI spec for vertx project

I want to generate an OpenAPI spec for my vertx project. So I have a simple vertx server as follows which just returns me a json object: package server; import io.vertx.core.AbstractVerticle; import io.vertx.core.http.HttpServer; import…
Juvenik
  • 900
  • 1
  • 8
  • 26
8
votes
2 answers

Serving up a single page rect app using java vert.x web server

I'm making use of a Vert.x web server to serve up a React app as static content. I want this to be served up from the path /, then within the React app it has its own routing using react-router which should decide which page to show. So far I have…
user843337
8
votes
2 answers

How to compile and use Kotlin code in runtime?

I'm trying to create a Kotlin Vert.x language support module and I need a way to compile Kotlin files and load the results with a ClassLoader. I've tried using kotlin-compiler library and found K2JVMCompiler class, but it seems to support only…
Czyzby
  • 2,999
  • 1
  • 22
  • 40
8
votes
3 answers

Vertx unit-test blocking the main thread

While trying to test a Vert.x verticle using the event bus through a test class, I'm getting an "blocking errors". Here down the verticle and test classes: EventBusReceiverVerticle: public class EventBusReceiverVerticle extends AbstractVerticle { …
rayman
  • 20,786
  • 45
  • 148
  • 246
8
votes
3 answers

Does Vert.x has real concurrency for single verticles?

the question might look like a troll but it is actually about how vert.x manages concurrency since a verticle itself runs in a dedicated thread. Let's look at this simple vert.x http server written in Java: import org.vertx.java.core.Handler; import…
Kr0e
  • 2,149
  • 2
  • 24
  • 40
8
votes
0 answers

Framework similar to vert.x for .Net

Is there a framework that is similar to vert.x (which is build on top of JVM) for .Net?
coder_bro
  • 10,503
  • 13
  • 56
  • 88
7
votes
1 answer

Where is the place to register a Jackson Codec in Vertx 4.0 using custom Object Mapper

I am trying to convert my Quarkus vertex sample to pure Vertx 4.0 and encountered a problem. In Quarkus, it is easy to customize the Jackson ObjectMapper to serialize or deserialize the HTTP messages. @ApplicationScoped public class…
Hantsy
  • 8,006
  • 7
  • 64
  • 109
7
votes
1 answer

What's the Promise equivalent of CompositeFuture in Vert.x 3.8.1+?

I have a Vert.x 3.7.1 method that deploys a bunch of verticles and if all of the deployments succeed, sends a message through the event bus that does some startup work. The structure of the method looks like this: void deploy() { Future
Daniel Kesner
  • 226
  • 4
  • 16
7
votes
2 answers

Vert.x redirect http to https

We have re-written our webservices with Vert.x 4 and we're more than satisfied. Before putting them in production we want to secure them and we're trying to enable https. This is the main verticle: public class MainVerticle extends AbstractVerticle…
Alberto Miola
  • 4,643
  • 8
  • 35
  • 49
7
votes
1 answer

Vertx clustering alternative

Anyone with real-world experience of Vertx cluster managers other than Hazelcast have advice on our requirement below? For our (real time sensor data) system we have hundreds of verticles in multiple JVM's, but we do not need, or want, the eventbus…
Bambam
  • 3,729
  • 1
  • 16
  • 16