This was a post writted for Making Devs Blog.

Recently we use the project Vertx for develop a project. Now I’m going to talk about the basic functionality.

VertX is a tool-kit for building reactive applications on the JVM.

It has many interesting features:

  1. Actor model based.
  2. It’s polyglot: you can use with Java, Groovy, Ruby, Scala, Ceylon, Javascript, and Kotlin.

Verticles

For the beginning it’s important know that VertX has a nervous system called Event Bus, where you can write and run Verticles.

Verticles are chunks of code that get deployed and run by Vert.x.

In groovy, a verticle is called consumer.

Every verticle have an identifier, it’s only a String. It could be deployed on a script or a class, and into him you can receive a message from another part of the Event Bus, and send a reply.

A Vertx Verticle:

  • Run on the event bus.

  • Have a address identifier (string)

  • Have a deployment ID (deployment identifier)

    • It can receive a message and send a reply to the same message
    • It can send message for other verticles

    A simple groovy consumer: