UNPKG

rocketmq-client-nodejs-beta

Version:
37 lines 2.41 kB
"use strict"; /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.TopicRouteData = void 0; const MessageQueue_1 = require("./MessageQueue"); class TopicRouteData { messageQueues = []; constructor(messageQueues) { for (const mq of messageQueues) { this.messageQueues.push(new MessageQueue_1.MessageQueue(mq)); } } getTotalEndpoints() { const endpointsMap = new Map(); for (const mq of this.messageQueues) { endpointsMap.set(mq.broker.endpoints.facade, mq.broker.endpoints); } return Array.from(endpointsMap.values()); } } exports.TopicRouteData = TopicRouteData; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVG9waWNSb3V0ZURhdGEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcm91dGUvVG9waWNSb3V0ZURhdGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7Ozs7R0FlRzs7O0FBSUgsaURBQThDO0FBRTlDLE1BQWEsY0FBYztJQUNoQixhQUFhLEdBQW1CLEVBQUUsQ0FBQztJQUU1QyxZQUFZLGFBQStCO1FBQ3pDLEtBQUssTUFBTSxFQUFFLElBQUksYUFBYSxFQUFFLENBQUM7WUFDL0IsSUFBSSxDQUFDLGFBQWEsQ0FBQyxJQUFJLENBQUMsSUFBSSwyQkFBWSxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7UUFDaEQsQ0FBQztJQUNILENBQUM7SUFFRCxpQkFBaUI7UUFDZixNQUFNLFlBQVksR0FBRyxJQUFJLEdBQUcsRUFBcUIsQ0FBQztRQUNsRCxLQUFLLE1BQU0sRUFBRSxJQUFJLElBQUksQ0FBQyxhQUFhLEVBQUUsQ0FBQztZQUNwQyxZQUFZLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxNQUFNLENBQUMsU0FBUyxDQUFDLE1BQU0sRUFBRSxFQUFFLENBQUMsTUFBTSxDQUFDLFNBQVMsQ0FBQyxDQUFDO1FBQ3BFLENBQUM7UUFDRCxPQUFPLEtBQUssQ0FBQyxJQUFJLENBQUMsWUFBWSxDQUFDLE1BQU0sRUFBRSxDQUFDLENBQUM7SUFDM0MsQ0FBQztDQUNGO0FBaEJELHdDQWdCQyJ9