UNPKG

@tulioncds/nestjs-nats-streaming-transport

Version:

Fork Nats Streaming Transport for NestJS - Auto Reconnect stan

20 lines 1.13 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.buildSubscriptionOptions = void 0; const buildSubscriptionOptions = (transportSubscriptionOptions, connection) => { const { ackWait, startAt, deliverAllAvailable, durableName, manualAckMode, maxInFligth, startAtSequence, startAtTimeDelta, startTime, startWithLastReceived, } = transportSubscriptionOptions; const opts = connection.subscriptionOptions(); ackWait && opts.setAckWait(ackWait); startAt && opts.setStartAt(startAt); deliverAllAvailable && opts.setDeliverAllAvailable(); durableName && opts.setDurableName(durableName); manualAckMode && opts.setManualAckMode(manualAckMode); maxInFligth && opts.setMaxInFlight(maxInFligth); startAtSequence && opts.setStartAtSequence(startAtSequence); startAtTimeDelta && opts.setStartAtTimeDelta(startAtTimeDelta); startTime && opts.setStartTime(startTime); startWithLastReceived && opts.setStartWithLastReceived(); return opts; }; exports.buildSubscriptionOptions = buildSubscriptionOptions; //# sourceMappingURL=build-subscription-options.js.map