UNPKG

redis-smq

Version:

A high-performance, reliable, and scalable message queue for Node.js.

16 lines 861 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports._getRoutingPatterns = _getRoutingPatterns; const redis_keys_js_1 = require("../../../common/redis/redis-keys/redis-keys.js"); const _parse_exchange_params_js_1 = require("../../_/_parse-exchange-params.js"); const index_js_1 = require("../../types/index.js"); function _getRoutingPatterns(redisClient, exchange, cb) { const exchangeParams = (0, _parse_exchange_params_js_1._parseExchangeParams)(exchange, index_js_1.EExchangeType.TOPIC); if (exchangeParams instanceof Error) cb(exchangeParams); else { const { keyExchangeBindingPatterns } = redis_keys_js_1.redisKeys.getExchangeTopicKeys(exchangeParams.ns, exchangeParams.name); redisClient.smembers(keyExchangeBindingPatterns, cb); } } //# sourceMappingURL=_get-routing-patterns.js.map