const {Dubbo} = require('dubbo2.js');
const service = require('./service');

const dubbo = (module.exports = new Dubbo({
  application: {name: 'dubbo-node-consumer'},
  register: 'localhost:2181',
  service,
}));

//cost middleware
dubbo.use(async function costTime(ctx, next) {
  console.log('before dubbo cost middleware');
  const startTime = Date.now();
  await next();
  const endTime = Date.now();
  console.log('end makecostTime->', endTime - startTime);
});

@@ -225,16 +225,18 @@
 dleware%0A
+/*
 dubbo.us
@@ -461,8 +461,11 @@
 e);%0A%7D);%0A
+*/%0A

add socket retry and refactor zookeeper