package io.vertx.example.core.eventbus.pointtopoint;

import io.vertx.core.AbstractVerticle;
import io.vertx.core.eventbus.EventBus;
import io.vertx.example.util.Runner;

/*
 * @author <a href="http://tfox.org">Tim Fox</a>
 */
public class Sender extends AbstractVerticle {

  // Convenience method so you can run it in your IDE
  public static void main(String[] args) {
    Runner.runClusteredExample(Sender.class);
  }

  @Override
  public void start() throws Exception {
    EventBus eb = vertx.eventBus();

    // Send a message every second

    vertx.setPeriodic(1000, v -> {

      eb.send("ping-address", "ping!", reply -> {
        System.out.println("Received reply " + reply.result().body());
      });

    });
  }
}

@@ -628,16 +628,51 @@
 ly -%3E %7B%0A
+        if (reply.succeeded()) %7B%0A  
         
@@ -734,16 +734,85 @@
 ody());%0A
+        %7D else %7B%0A          System.out.println(%22No reply%22);%0A        %7D%0A
       %7D)

Improve reply handler in pointtopoint examples