UNPKG

@nestjs/microservices

Version:

Microservices for NestJS: message and event handlers over Kafka, RabbitMQ, NATS, Redis, MQTT, gRPC or TCP.

57 lines (56 loc) • 993 B
/** * @publicApi */ export class MqttRecord { data; options; constructor(data, options) { this.data = data; this.options = options; } } /** * @publicApi */ export class MqttRecordBuilder { data; options; constructor(data) { this.data = data; } setData(data) { this.data = data; return this; } setQoS(qos) { this.options = { ...this.options, qos, }; return this; } setRetain(retain) { this.options = { ...this.options, retain, }; return this; } setDup(dup) { this.options = { ...this.options, dup, }; return this; } setProperties(properties) { this.options = { ...this.options, properties, }; return this; } build() { return new MqttRecord(this.data, this.options); } }