UNPKG

@nestjstools/messaging

Version:

Simplifies asynchronous and synchronous message handling with support for buses, handlers, channels, and consumers. Build scalable, decoupled applications with ease and reliability.

15 lines 729 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MessageFactory = void 0; const sealed_routing_message_1 = require("./sealed-routing-message"); const routing_message_1 = require("./routing-message"); class MessageFactory { static creteSealedFromMessage(message, fromMessage) { return new sealed_routing_message_1.SealedRoutingMessage(message, fromMessage.messageRoutingKey, fromMessage.messageOptions); } static creteRoutingFromMessage(message, fromMessage) { return new routing_message_1.RoutingMessage(message, fromMessage.messageRoutingKey, fromMessage.messageOptions); } } exports.MessageFactory = MessageFactory; //# sourceMappingURL=message.factory.js.map