UNPKG

@nestjs/microservices

Version:

Nest - modern, fast, powerful node.js web framework (@microservices)

22 lines (21 loc) 414 B
import { BaseRpcContext } from './base-rpc.context.js'; /** * @publicApi */ export class MqttContext extends BaseRpcContext { constructor(args) { super(args); } /** * Returns the name of the topic. */ getTopic() { return this.args[0]; } /** * Returns the reference to the original MQTT packet. */ getPacket() { return this.args[1]; } }