assertTrue(result.succeeded());
final Cluster cluster = result.result();
// Use the special EventBusHookListener to listen for messages
// from the event bus hook. This will handle parsing event bus messages.
final EventBusHookListener listener = new EventBusHookListener("test-hook", vertx.eventBus());
listener.startHandler(new Handler<InstanceContext>() {
@Override
public void handle(InstanceContext context) {
assertEquals("sender", context.component().name());
testComplete();
}
});
// The start() method simply registers an event bus handler for the hook.
listener.start(new Handler<AsyncResult<Void>>() {
@Override
public void handle(AsyncResult<Void> result) {
assertTrue(result.succeeded());
NetworkConfig network = vertigo.createNetwork();