第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Vertx-InfluxDB指標(biāo)保持連接打開

Vertx-InfluxDB指標(biāo)保持連接打開

慕無忌1623718 2021-04-16 15:19:30
我正在嘗試通過InfluxDB實例將指標(biāo)報告合并到我的Vertx應(yīng)用程序中。但是,當(dāng)我嘗試正常結(jié)束我的應(yīng)用程序時,某處有一個掛起的線程。我設(shè)法將其跟蹤到InfluxDB連接以進行vertx的指標(biāo)報告,或者看起來如此,但是我沒有找到殺死它的方法。誰能指出我正確的方向?一個最小的工作示例(如果禁用指標(biāo),則應(yīng)用程序會正常完成,否則將掛起):import io.vertx.core.Vertx;import io.vertx.core.VertxOptions;import io.vertx.micrometer.MicrometerMetricsOptions;import io.vertx.micrometer.VertxInfluxDbOptions;import io.vertx.micrometer.backends.BackendRegistries;public class MWE {    public static void main(String[] args) {        //setting up the metric options for influxdb. seems to work in MWE without credentials        MicrometerMetricsOptions metricsOptions = new MicrometerMetricsOptions()                .setRegistryName("data-client")                .setInfluxDbOptions(new VertxInfluxDbOptions()                        //disabling this would make sure the application _does_ gracefully exit                        .setEnabled(true)                )                .setEnabled(true);        //setting up the vertx instance        Vertx vertx = Vertx.vertx(                new VertxOptions()                        .setMetricsOptions(metricsOptions)                        .setWorkerPoolSize(50)        );        //stop vertx after a second        vertx.setTimer(1000, timerID -> {            //closing the vertx instance            vertx.close(result -> System.out.println("Vertx was closed."));            //closing the registry of metrics to influxdb            BackendRegistries.getNow("data-client").close();            System.out.println("Closed everything");        });        System.out.println("Done with main");    }}
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 246 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號