|
@@ -93,10 +93,14 @@ class CreeperxtsreadService extends CrudService {
|
|
}
|
|
}
|
|
|
|
|
|
async toMq(data) {
|
|
async toMq(data) {
|
|
|
|
+ console.log('in toMq');
|
|
|
|
+ console.log(`data:${data.lenght}`);
|
|
if (this.ctx.mq) {
|
|
if (this.ctx.mq) {
|
|
const exchange = 'service_count';
|
|
const exchange = 'service_count';
|
|
const routerKey = 'nodes';
|
|
const routerKey = 'nodes';
|
|
const parm = { durable: true };
|
|
const parm = { durable: true };
|
|
|
|
+ console.log(`exchange:${exchange}`);
|
|
|
|
+ console.log(`routerKey:${routerKey}`);
|
|
await this.mq.fanout(exchange, routerKey, JSON.stringify(data), parm);
|
|
await this.mq.fanout(exchange, routerKey, JSON.stringify(data), parm);
|
|
}
|
|
}
|
|
}
|
|
}
|