Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Vert.x MQTT Server examples

Here you will find examples demonstrating Vert.x MQTT Server in action.

Vert.x MQTT Server provides a server which is able to handle connections, communication and messages exchange with remote MQTT clients. Please consult the Vert.x MQTT Server documentation for more information.

Examples can be run directly from the IDE by executing the main method. Alternatively, you can run them using the vertx command line tool (that need to be installed beforehand):

mvn clean compile
vertx run fully-qualified-name-of-the-example -cp target/classes

Adapt the -cp option value for your current working directory and operating system.

Dependencies required

To use Vert.x MQTT Server in your own Maven or Gradle project add the following dependency

Group ID: io.vertx
Artifact ID: vertx-mqtt-server

MQTT Server examples

These examples demonstrate usage of Vert.x MQTT servers.

Simple

This example consists of a simple server verticle which serves MQTT connections, and simply echoes back whatever it receives.

You need an MQTT Client

It also contains an echo client, which creates a connection to the server, sends some data and logs out what it receives back. You can use that as an alternative to connecting via telnet.

Echo SSL

This is the same as the Echo example but using SSL to encrypt connections