1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.CONNECTION_FAILED_MESSAGE = exports.EADDRINUSE = exports.CONN_ERR = exports.ECONNREFUSED = exports.MQTT_WILDCARD_ALL = exports.MQTT_WILDCARD_SINGLE = exports.MQTT_SEPARATOR = exports.KAFKA_DEFAULT_GROUP = exports.KAFKA_DEFAULT_CLIENT = exports.DISCONNECTED_RMQ_MESSAGE = exports.NO_MESSAGE_HANDLER = exports.NO_EVENT_HANDLER = exports.GRPC_DEFAULT_PROTO_LOADER = exports.RQM_NO_EVENT_HANDLER = exports.RQM_DEFAULT_NO_ASSERT = exports.RQM_DEFAULT_PERSISTENT = exports.RQM_DEFAULT_NOACK = exports.RQM_DEFAULT_QUEUE_OPTIONS = exports.RQM_DEFAULT_IS_GLOBAL_PREFETCH_COUNT = exports.RQM_DEFAULT_PREFETCH_COUNT = exports.RQM_DEFAULT_QUEUE = exports.REPLY_PATTERN_METADATA = exports.REQUEST_PATTERN_METADATA = exports.PARAM_ARGS_METADATA = exports.CLIENT_METADATA = exports.PATTERN_HANDLER_METADATA = exports.CLIENT_CONFIGURATION_METADATA = exports.TRANSPORT_METADATA = exports.PATTERN_EXTRAS_METADATA = exports.PATTERN_METADATA = exports.CANCEL_EVENT = exports.SUBSCRIBE = exports.CLOSE_EVENT = exports.ERROR_EVENT = exports.DATA_EVENT = exports.MESSAGE_EVENT = exports.CONNECT_FAILED_EVENT = exports.DISCONNECT_EVENT = exports.CONNECT_EVENT = exports.KAFKA_DEFAULT_BROKER = exports.RQM_DEFAULT_URL = exports.GRPC_DEFAULT_URL = exports.MQTT_DEFAULT_URL = exports.NATS_DEFAULT_URL = exports.REDIS_DEFAULT_HOST = exports.REDIS_DEFAULT_PORT = exports.TCP_DEFAULT_HOST = exports.TCP_DEFAULT_PORT = void 0;
|
4 | const constants_1 = require("@nestjs/common/constants");
|
5 | exports.TCP_DEFAULT_PORT = 3000;
|
6 | exports.TCP_DEFAULT_HOST = 'localhost';
|
7 | exports.REDIS_DEFAULT_PORT = 6379;
|
8 | exports.REDIS_DEFAULT_HOST = 'localhost';
|
9 | exports.NATS_DEFAULT_URL = 'nats://localhost:4222';
|
10 | exports.MQTT_DEFAULT_URL = 'mqtt://localhost:1883';
|
11 | exports.GRPC_DEFAULT_URL = 'localhost:5000';
|
12 | exports.RQM_DEFAULT_URL = 'amqp://localhost';
|
13 | exports.KAFKA_DEFAULT_BROKER = 'localhost:9092';
|
14 | exports.CONNECT_EVENT = 'connect';
|
15 | exports.DISCONNECT_EVENT = 'disconnect';
|
16 | exports.CONNECT_FAILED_EVENT = 'connectFailed';
|
17 | exports.MESSAGE_EVENT = 'message';
|
18 | exports.DATA_EVENT = 'data';
|
19 | exports.ERROR_EVENT = 'error';
|
20 | exports.CLOSE_EVENT = 'close';
|
21 | exports.SUBSCRIBE = 'subscribe';
|
22 | exports.CANCEL_EVENT = 'cancelled';
|
23 | exports.PATTERN_METADATA = 'microservices:pattern';
|
24 | exports.PATTERN_EXTRAS_METADATA = 'microservices:pattern_extras';
|
25 | exports.TRANSPORT_METADATA = 'microservices:transport';
|
26 | exports.CLIENT_CONFIGURATION_METADATA = 'microservices:client';
|
27 | exports.PATTERN_HANDLER_METADATA = 'microservices:handler_type';
|
28 | exports.CLIENT_METADATA = 'microservices:is_client_instance';
|
29 | exports.PARAM_ARGS_METADATA = constants_1.ROUTE_ARGS_METADATA;
|
30 | exports.REQUEST_PATTERN_METADATA = 'microservices:request_pattern';
|
31 | exports.REPLY_PATTERN_METADATA = 'microservices:reply_pattern';
|
32 | exports.RQM_DEFAULT_QUEUE = 'default';
|
33 | exports.RQM_DEFAULT_PREFETCH_COUNT = 0;
|
34 | exports.RQM_DEFAULT_IS_GLOBAL_PREFETCH_COUNT = false;
|
35 | exports.RQM_DEFAULT_QUEUE_OPTIONS = {};
|
36 | exports.RQM_DEFAULT_NOACK = true;
|
37 | exports.RQM_DEFAULT_PERSISTENT = false;
|
38 | exports.RQM_DEFAULT_NO_ASSERT = false;
|
39 | const RQM_NO_EVENT_HANDLER = (text, pattern) => `An unsupported event was received. It has been acknowledged, so it will not be re-delivered. Pattern: ${pattern}`;
|
40 | exports.RQM_NO_EVENT_HANDLER = RQM_NO_EVENT_HANDLER;
|
41 | exports.GRPC_DEFAULT_PROTO_LOADER = '@grpc/proto-loader';
|
42 | const NO_EVENT_HANDLER = (text, pattern) => `There is no matching event handler defined in the remote service. Event pattern: ${pattern}`;
|
43 | exports.NO_EVENT_HANDLER = NO_EVENT_HANDLER;
|
44 | exports.NO_MESSAGE_HANDLER = `There is no matching message handler defined in the remote service.`;
|
45 | exports.DISCONNECTED_RMQ_MESSAGE = `Disconnected from RMQ. Trying to reconnect.`;
|
46 | exports.KAFKA_DEFAULT_CLIENT = 'nestjs-consumer';
|
47 | exports.KAFKA_DEFAULT_GROUP = 'nestjs-group';
|
48 | exports.MQTT_SEPARATOR = '/';
|
49 | exports.MQTT_WILDCARD_SINGLE = '+';
|
50 | exports.MQTT_WILDCARD_ALL = '#';
|
51 | exports.ECONNREFUSED = 'ECONNREFUSED';
|
52 | exports.CONN_ERR = 'CONN_ERR';
|
53 | exports.EADDRINUSE = 'EADDRINUSE';
|
54 | exports.CONNECTION_FAILED_MESSAGE = 'Connection to transport failed. Trying to reconnect...';
|