Community
Participate
Working Groups
When implementing VertxMetrics at the point when the event bus createMetrics method is called the eventBus variable is null on the vertx instance. You do get the eventBus variable passed in to you that will be set on the object but it would probably be ideal to make sure this is set beforehand. I tested this on 3.1.0. public class SomeVertxMetricsImpl implements VertxMetrics { ..... public SomeVertxMetricsImpl(SomeMetricsOptions options, Vertx vertx) { this.vertx = vertx; this.options = new SomeMetricsOptions(options); } ..... @Override public EventBusMetrics createMetrics(EventBus eventBus) { // if you access vertx.eventBus() it returns null here, the eventBus var passed in above though is the instance that will be set on the vertx instance it just is a little confusing } ..... public HttpClientMetrics<?, ?, ?> createMetrics(HttpClient client, HttpClientOptions options) { // if you access vertx.eventBus() here it's valid and not null } ..... }