import { Inject, Injectable } from '@nestjs/common'; import { ClientProxy } from '@nestjs/microservices'; @Injectable() export class SampleAppService { constructor(@Inject(`FINGERPRINT_SERVICE`) private client: ClientProxy) { // logic here } getHello(): string { return 'Hello World! I am Sample App Nestjs.'; } // testing. Try to talk to Fingerprint App via microservice talkToFingerprint(message: string): any { this.client.emit(`eventTest`, message) return this.client.send({ cmd: `messageTest` }, message) } }