Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
    RobinJ1995 (:dendrite.matrix.org)
    the docs mention reply handlers can be used for event bus messages; https://vertx.io/docs/vertx-core/java/#_acknowledging_messages_sending_replies
    but in the docs for MessageProducer the only method that allows a replyHandler (send) has been marked as deprecated in 3.x and has indeed been removed in 4.x (which is what i'm using). yet MessageConsumer still has a reply method. how am i meant to add a reply handler to a message in vert.x 4?
    Saltuk Bugra Avci
    Hi everyone do vert.x has nonblocking XmlParser ?
    Sun Feiyue
    Is it possible to explicitly assign a port for vert.x TCP client?
    Navnath Chinchore
    Hi All,
    We are planning to do a structured logging in our vertx microservice. Is there a way to do this in vertx
    A. Bos
    I see the HTTP Proxy implementation is on its way, which is really nice.
    Would it be possible to wrap some logic around the Proxy before sending. For example, exclude some endpoint, or modify the headers (more of API Gateway functionality)
    So vertx metrics support influxdb v2 now?
    Johannes Schüth
    Chat deprecated - use Discord instead https://discord.gg/KzEMwP2

    In our codebase, we are using Vertx web 3.9.4 version.
    Router is used for both pure Http requests and upgraded websocket calls. Now, there is a common handler RoutingContext.addEndBodyHandler, which does some logging important for both usecases Http and Websocket.
    I discovered for Websocket calls this handler is not called. As per javadoc

    Provides a handler that will be called after the last part of the body is written to the wire. The handler is called asynchronously of when the response has been received by the client. This provides a hook allowing you to do more operations once the request has been sent over the wire. Do not use this for resource cleanup as this handler might never get called (e.g. if the connection is reset).

    Question: Whats the alternative to have this common code for both usecases?

    Discord link is not loading the chat, may be discord problem :(
    Alan Kleiman
    Hi, I'm using vertx-pg-client, version 4.1.0 and I think I'm seeing the following situation: when under heavy load the database starts taking a while to respond and I suspect this is making the client/pool discard a connection as "dead". The connection doesn't get killed server-side, though, and the pool opens a new connection in its place. As a result I can see in pg_stat_activity that my app has 2, 3x the # of active connections as I declared in my pool. Is there some way to tune the connection so it takes longer to decide a connection is dead? Is it poolCleanerPeriod on the pool, is it on the client?
    3 replies
    Paulo Lopes
    @akleiman please post on the discord server. Link is in the heading and a few messages back...
    Simon Klakegg
    hello, just a general thought. after using vert.x for 1-2 years now I'm very happy with the libraries. however, one thing I find a bit cumbersome/verbose is working with asyncmap. for instance updating a value takes three operations each with a handler (e.g., get map, get value, update value) and it quickly gets a bit messy. what's the best way to go about this? I made some helper methods, but maybe there is not much more that can be done before e.g., project loom is available (Vertx-Sync)?

    Does Vert.X Mongo support resumable file uploads?
    The idea is to use the Youtube Resumeable Upload protocol to upload large binary files to MongoDB/GridFS but I can't find an equivalent to an append function for GridFS (to resume the upload).

    Okay at least for MongoDB I might have found the answer to my own question - due to concurrency the API won't support append: https://jira.mongodb.org/browse/JAVA-2765

    Krzysztof Ziomek
    Hi, would be great if you could refer me to document describing "best practices" for configuring circuit breakers?
    Currently we have http client instance per verticle. We don't share http clients against verticles because responses were handled by random event loops which were different from event loops handling requests.
    Also currently we have circuit breaker instances in relation 1:1 with http client instances.
    Now we do consider sharing the same instance of circuit breaker by clients in all verticles invoking the same target service.
    So i.e. we would have 16 verticles, 16 clients and 1 circuit breaker instance shared by all 16 client.
    Initial tests confirmed responses are handled by the same event loop as requests so we can't see any issue with that approach.
    Are there any known recommendations/reasons advising against going this path?
    Park Jeong Woo

    Hello :)
    I am implementing websocket on server and using writePing api.
    Trying to implement a heartbeat between client and server.

    By the way, On other verticle, want to send a ping in this form.
    Is there any possible way?

    eventbus.send(ServerWebsocket.textHandlerID(), PING) ;

    I am following https://github.com/vert-x3/vertx-guide-for-java-devs/blob/3.8/step-1/src/main/java/io/vertx/guides/wiki/MainVerticle.java

    Code there is as:

    public void start(Promise<Void> promise) throws Exception {
    Future<Void> steps = prepareDatabase().compose(v -> startHttpServer());

    But in available pdf, its:

    @Override public void start(Future<Void> startFuture) throws Exception

    Not sure which one is older
    Any input here?
    Dan O'Reilly
    @mghildiy Promise<Void> is newer/preferred
    Thanks @dano
    I have written a simple vertx application, from book 'Building reactive Microservices in Java'....
    public class MyFirstVerticle extends AbstractVerticle {
    I put some simple code in start method...thats all
    I can run the application using command mvn compile vertx:run
    But I am not able to stop it..ctrl+c(as suggested in book) doesnt work
    application keeps running and sending back responses
    What is best way to stop it?
    can someone help me
    btw is this channel still active?
    Dan O'Reilly
    @Kuruchan30_twitter no, check the channel topic
    Is there a way to pass out Parameters with the new JDBCPool?, I can't find a way to do it
    Asad Awadia
    What is the difference between pgpool.pool and pgpool.client in the postgres client? Which one should i use in general? And which one does better pipelining?
    Hey, how can I submit a query with a postgresql pool transaction? For example, the following does not work
    pool.withTransaction(conn -> {
      return conn.query(
        "insert into my_table (my_field) VALUES ($1)"
    It seems like the execute function wasn't overloaded somewhere in the implementation
    Nevermind, I should have used a preparedQuery.
    Paulo Lopes
    @boulderwebdev please see the note on the top, community support is moved to discord, you will get anwsers there quicker!
    Denis Ivanov
    hello all! Could please someone help with handling websockets by vert.x behind nginx. Can't understand why the main thread is blocked if I try to send more than 50KB of data.. Before I used writeFinalTextFrame() and everything worked fine but recently this error appeared. Now I switched to text handler which registered automatically on eventbus. I hope it uses queue under the hood. Any ideas are appreciated!
    Navnath Chinchore
    We have build cron framework in our service to run some task at particular time durations.
    We have used set vertx.setPeriodic for to schedule these tasks. But we are observing strange behaviour after upgrading to 3.9.7. set periodic stops working after 14, 15 days of service uptime.
    Earlier we were on 3.5.2 and everything were working fine. Is there anyone facing the same issue.
    Can someone please have look
    Paulo Lopes
    @NChinchore_twitter you should try the discord server. Gitter isn't used anymore.
    @pml0pes:matrix.org Is there any way to change the name of this room on the left hand side? (Right now it reads "vertx-users", but this could be changed to "vertx-users (deprecated)")
    Hantsy Bai
    Paulo Lopes
    @hantsy, Thomas who has worked on this is/was on PTO so you may have a slow response. Also note that this chat is deprecated and you should better ask on discord: https://discord.gg/KzEMwP2 where we are active and the whole community has moved to.
    Hi there. I just want to share my pet project: https://github.com/crabzilla/crabzilla just in case you like Vertx, Postgres, Kotlin, CQRS and Event Sourcing. Feedbacks are very welcome.
    4 replies
    KrishnaRao Veeramachaneni
    Hi All, i 'm using the httplclient.postabs call with https based URL
    vertx says "Failed to create SSL connection"
    Vert.x Vertical Fail : Failed to create SSL connection
    KrishnaRao Veeramachaneni
    Do we have any other way to disable the HostNameVerfier set as false ?
    Tarana Desai
    How to log all database queries? I am using io.vertx:vertx-jdbc-client and io.vertx:vertx-pg-client

    How to log all database queries? I am using io.vertx:vertx-jdbc-client and io.vertx:vertx-pg-client

    Hi, if you are using io.vertx:vertx-jdbc-client, you can use https://github.com/p6spy/p6spy to log query sql