@diia-inhouse/diia-queue 13.3.3 → 14.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.js +9 -9
- package/dist/index.d.ts +27 -0
- package/dist/index.js +23 -21
- package/dist/interfaces/deps.d.ts +30 -0
- package/dist/interfaces/externalCommunicator.d.ts +58 -0
- package/dist/interfaces/index.d.ts +95 -0
- package/dist/interfaces/index.js +7 -30
- package/dist/interfaces/messageBrokerServiceConfig.d.ts +80 -0
- package/dist/interfaces/messageBrokerServiceConfig.js +27 -24
- package/dist/interfaces/messageHandler.d.ts +6 -0
- package/dist/interfaces/metrics/index.d.ts +23 -0
- package/dist/interfaces/metrics/index.js +12 -16
- package/dist/interfaces/options.d.ts +52 -0
- package/dist/interfaces/providers/rabbitmq/amqpConnection.d.ts +33 -0
- package/dist/interfaces/providers/rabbitmq/amqpConnection.js +14 -17
- package/dist/interfaces/providers/rabbitmq/amqpPublisher.d.ts +20 -0
- package/dist/interfaces/providers/rabbitmq/index.d.ts +107 -0
- package/dist/interfaces/providers/rabbitmq/index.js +35 -47
- package/dist/interfaces/queueConfig/configs.d.ts +47 -0
- package/dist/interfaces/queueConfig/configs.js +8 -9
- package/dist/interfaces/queueConfig/index.d.ts +1 -0
- package/dist/interfaces/queueContext.d.ts +8 -0
- package/dist/interfaces/queueStatus.d.ts +15 -0
- package/dist/interfaces/queueStatus.js +8 -9
- package/dist/metrics/index.js +5 -8
- package/dist/providers/index.d.ts +5 -0
- package/dist/providers/index.js +6 -22
- package/dist/providers/rabbitmq/amqpAsserter.d.ts +53 -0
- package/dist/providers/rabbitmq/amqpAsserter.js +369 -416
- package/dist/providers/rabbitmq/amqpConnection.d.ts +24 -0
- package/dist/providers/rabbitmq/amqpConnection.js +97 -150
- package/dist/providers/rabbitmq/amqpListener.d.ts +47 -0
- package/dist/providers/rabbitmq/amqpListener.js +218 -225
- package/dist/providers/rabbitmq/amqpPublisher.d.ts +38 -0
- package/dist/providers/rabbitmq/amqpPublisher.js +184 -191
- package/dist/providers/rabbitmq/index.d.ts +56 -0
- package/dist/providers/rabbitmq/index.js +161 -186
- package/dist/services/communicator.d.ts +66 -0
- package/dist/services/communicator.js +164 -186
- package/dist/services/eventBus.d.ts +25 -0
- package/dist/services/eventBus.js +45 -57
- package/dist/services/eventCommunicator.js +75 -124
- package/dist/services/eventMessageHandler.d.ts +25 -0
- package/dist/services/eventMessageHandler.js +112 -129
- package/dist/services/eventMessageValidator.d.ts +13 -0
- package/dist/services/eventMessageValidator.js +59 -44
- package/dist/services/externalCommunicator.d.ts +114 -0
- package/dist/services/externalCommunicator.js +149 -140
- package/dist/services/externalEventBus.d.ts +39 -0
- package/dist/services/externalEventBus.js +144 -162
- package/dist/services/index.d.ts +8 -0
- package/dist/services/index.js +10 -26
- package/dist/services/metrics.d.ts +15 -0
- package/dist/services/metrics.js +46 -49
- package/dist/services/optionsBuilder.d.ts +14 -0
- package/dist/services/optionsBuilder.js +43 -58
- package/dist/services/queue.d.ts +29 -0
- package/dist/services/queue.js +78 -93
- package/dist/services/scheduledTask.d.ts +30 -0
- package/dist/services/scheduledTask.js +60 -68
- package/dist/services/task.d.ts +33 -0
- package/dist/services/task.js +160 -176
- package/dist/utils.js +7 -11
- package/package.json +44 -50
- package/dist/constants.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/interfaces/deps.js +0 -3
- package/dist/interfaces/deps.js.map +0 -1
- package/dist/interfaces/externalCommunicator.js +0 -3
- package/dist/interfaces/externalCommunicator.js.map +0 -1
- package/dist/interfaces/index.js.map +0 -1
- package/dist/interfaces/messageBrokerServiceConfig.js.map +0 -1
- package/dist/interfaces/messageHandler.js +0 -3
- package/dist/interfaces/messageHandler.js.map +0 -1
- package/dist/interfaces/metrics/index.js.map +0 -1
- package/dist/interfaces/options.js +0 -3
- package/dist/interfaces/options.js.map +0 -1
- package/dist/interfaces/providers/rabbitmq/amqpConnection.js.map +0 -1
- package/dist/interfaces/providers/rabbitmq/amqpPublisher.js +0 -4
- package/dist/interfaces/providers/rabbitmq/amqpPublisher.js.map +0 -1
- package/dist/interfaces/providers/rabbitmq/index.js.map +0 -1
- package/dist/interfaces/queueConfig/configs.js.map +0 -1
- package/dist/interfaces/queueConfig/index.js +0 -18
- package/dist/interfaces/queueConfig/index.js.map +0 -1
- package/dist/interfaces/queueContext.js +0 -3
- package/dist/interfaces/queueContext.js.map +0 -1
- package/dist/interfaces/queueStatus.js.map +0 -1
- package/dist/interfaces/services/eventMessageHandler.js +0 -3
- package/dist/interfaces/services/eventMessageHandler.js.map +0 -1
- package/dist/metrics/index.js.map +0 -1
- package/dist/providers/index.js.map +0 -1
- package/dist/providers/rabbitmq/amqpAsserter.js.map +0 -1
- package/dist/providers/rabbitmq/amqpConnection.js.map +0 -1
- package/dist/providers/rabbitmq/amqpListener.js.map +0 -1
- package/dist/providers/rabbitmq/amqpPublisher.js.map +0 -1
- package/dist/providers/rabbitmq/index.js.map +0 -1
- package/dist/services/communicator.js.map +0 -1
- package/dist/services/eventBus.js.map +0 -1
- package/dist/services/eventCommunicator.js.map +0 -1
- package/dist/services/eventMessageHandler.js.map +0 -1
- package/dist/services/eventMessageValidator.js.map +0 -1
- package/dist/services/externalCommunicator.js.map +0 -1
- package/dist/services/externalEventBus.js.map +0 -1
- package/dist/services/index.js.map +0 -1
- package/dist/services/metrics.js.map +0 -1
- package/dist/services/optionsBuilder.js.map +0 -1
- package/dist/services/queue.js.map +0 -1
- package/dist/services/scheduledTask.js.map +0 -1
- package/dist/services/task.js.map +0 -1
- package/dist/types/constants.d.ts +0 -8
- package/dist/types/index.d.ts +0 -4
- package/dist/types/interfaces/deps.d.ts +0 -26
- package/dist/types/interfaces/externalCommunicator.d.ts +0 -54
- package/dist/types/interfaces/index.d.ts +0 -99
- package/dist/types/interfaces/messageBrokerServiceConfig.d.ts +0 -79
- package/dist/types/interfaces/messageHandler.d.ts +0 -2
- package/dist/types/interfaces/metrics/index.d.ts +0 -20
- package/dist/types/interfaces/options.d.ts +0 -49
- package/dist/types/interfaces/providers/rabbitmq/amqpConnection.d.ts +0 -29
- package/dist/types/interfaces/providers/rabbitmq/amqpPublisher.d.ts +0 -16
- package/dist/types/interfaces/providers/rabbitmq/index.d.ts +0 -114
- package/dist/types/interfaces/queueConfig/configs.d.ts +0 -47
- package/dist/types/interfaces/queueConfig/index.d.ts +0 -1
- package/dist/types/interfaces/queueContext.d.ts +0 -4
- package/dist/types/interfaces/queueStatus.d.ts +0 -11
- package/dist/types/interfaces/services/eventMessageHandler.d.ts +0 -5
- package/dist/types/metrics/index.d.ts +0 -3
- package/dist/types/providers/index.d.ts +0 -5
- package/dist/types/providers/rabbitmq/amqpAsserter.d.ts +0 -49
- package/dist/types/providers/rabbitmq/amqpConnection.d.ts +0 -20
- package/dist/types/providers/rabbitmq/amqpListener.d.ts +0 -42
- package/dist/types/providers/rabbitmq/amqpPublisher.d.ts +0 -34
- package/dist/types/providers/rabbitmq/index.d.ts +0 -52
- package/dist/types/services/communicator.d.ts +0 -57
- package/dist/types/services/eventBus.d.ts +0 -20
- package/dist/types/services/eventCommunicator.d.ts +0 -15
- package/dist/types/services/eventMessageHandler.d.ts +0 -19
- package/dist/types/services/eventMessageValidator.d.ts +0 -9
- package/dist/types/services/externalCommunicator.d.ts +0 -110
- package/dist/types/services/externalEventBus.d.ts +0 -33
- package/dist/types/services/index.d.ts +0 -9
- package/dist/types/services/metrics.d.ts +0 -11
- package/dist/types/services/optionsBuilder.d.ts +0 -10
- package/dist/types/services/queue.d.ts +0 -23
- package/dist/types/services/scheduledTask.d.ts +0 -25
- package/dist/types/services/task.d.ts +0 -28
- package/dist/types/utils.d.ts +0 -3
- package/dist/utils.js.map +0 -1
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { Options } from 'amqplib';
|
|
2
|
-
interface BaseBindOptions {
|
|
3
|
-
exchangeName: string;
|
|
4
|
-
routingKey?: string;
|
|
5
|
-
}
|
|
6
|
-
export interface BindOptions extends BaseBindOptions {
|
|
7
|
-
bind?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export interface UnbindOptions extends BaseBindOptions {
|
|
10
|
-
unbind?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export interface RecreateChannelOptions {
|
|
13
|
-
timeout?: number;
|
|
14
|
-
maxTries?: number;
|
|
15
|
-
backoffCoefficient?: number;
|
|
16
|
-
}
|
|
17
|
-
export interface ConsumerOptions {
|
|
18
|
-
consumerTag?: string;
|
|
19
|
-
prefetchCount?: number;
|
|
20
|
-
recreateChannelOptions?: RecreateChannelOptions;
|
|
21
|
-
}
|
|
22
|
-
export type ExchangeName = string;
|
|
23
|
-
export declare enum ExchangeType {
|
|
24
|
-
Direct = "direct",
|
|
25
|
-
Fanout = "fanout",
|
|
26
|
-
Topic = "topic",
|
|
27
|
-
Headers = "headers",
|
|
28
|
-
/**
|
|
29
|
-
* @deprecated the RabbitMQ plugin that supports delayed messages is deprecated and should be removed in the future
|
|
30
|
-
*/
|
|
31
|
-
XDelayedMessage = "x-delayed-message"
|
|
32
|
-
}
|
|
33
|
-
export interface ExchangeOptions {
|
|
34
|
-
name: ExchangeName;
|
|
35
|
-
type?: ExchangeType;
|
|
36
|
-
declare?: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* @deprecated the RabbitMQ plugin that supports delayed messages is deprecated and should be removed in the future
|
|
39
|
-
*/
|
|
40
|
-
delayed?: boolean;
|
|
41
|
-
options?: Options.AssertExchange;
|
|
42
|
-
bindTo?: BindOptions[];
|
|
43
|
-
}
|
|
44
|
-
export declare const MessageBrokerExternalServiceTypes: readonly ["externalEventBus"];
|
|
45
|
-
export type MessageBrokerExternalServiceType = (typeof MessageBrokerExternalServiceTypes)[number];
|
|
46
|
-
export declare const MessageBrokerInternalServiceTypes: readonly ["task", "eventBus", "scheduledTask"];
|
|
47
|
-
export type MessageBrokerInternalServiceType = (typeof MessageBrokerInternalServiceTypes)[number];
|
|
48
|
-
export declare const MessageBrokerGeneralServiceTypes: readonly ["general"];
|
|
49
|
-
export type MessageBrokerGeneralServiceType = (typeof MessageBrokerGeneralServiceTypes)[number];
|
|
50
|
-
export type MessageBrokerServiceType = MessageBrokerExternalServiceType | MessageBrokerInternalServiceType | MessageBrokerGeneralServiceType;
|
|
51
|
-
export interface MessageBrokerServiceConfig {
|
|
52
|
-
queuesOptions: QueueOptions[];
|
|
53
|
-
exchangesOptions: ExchangeOptions[];
|
|
54
|
-
}
|
|
55
|
-
export declare const emptyMessageBrokerServiceConfig: MessageBrokerServiceConfig;
|
|
56
|
-
export type MessageBrokerServicesConfig = {
|
|
57
|
-
[k in MessageBrokerServiceType]?: MessageBrokerServiceConfig;
|
|
58
|
-
};
|
|
59
|
-
export declare const QueueTypes: {
|
|
60
|
-
readonly Quorum: "quorum";
|
|
61
|
-
readonly Classic: "classic";
|
|
62
|
-
};
|
|
63
|
-
type QueueType = (typeof QueueTypes)[keyof typeof QueueTypes];
|
|
64
|
-
export interface BaseQueueOptions {
|
|
65
|
-
type?: QueueType;
|
|
66
|
-
options?: Options.AssertQueue;
|
|
67
|
-
}
|
|
68
|
-
export interface RedeclareQueueOptions extends BaseQueueOptions {
|
|
69
|
-
redeclare?: boolean;
|
|
70
|
-
}
|
|
71
|
-
export interface QueueOptions extends BaseQueueOptions {
|
|
72
|
-
name: string;
|
|
73
|
-
declare?: boolean;
|
|
74
|
-
bindTo: BindOptions[];
|
|
75
|
-
unbindFrom?: UnbindOptions[];
|
|
76
|
-
consumerOptions?: ConsumerOptions;
|
|
77
|
-
redeclareOptions?: RedeclareQueueOptions;
|
|
78
|
-
}
|
|
79
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export interface TotalListenerChannelErrorsLabelsMap {
|
|
2
|
-
queueName: string;
|
|
3
|
-
}
|
|
4
|
-
export interface TotalMessageHandlerErrorsLabelsMap {
|
|
5
|
-
event: string;
|
|
6
|
-
serviceName: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const LabelUnknown = "unknown";
|
|
9
|
-
export type CommunicationDirection = ['inbound', 'outbound'][number];
|
|
10
|
-
export declare class CommunicationsTotalLabelsMap {
|
|
11
|
-
event: string;
|
|
12
|
-
source: string;
|
|
13
|
-
queue?: string;
|
|
14
|
-
destination?: string;
|
|
15
|
-
direction: CommunicationDirection;
|
|
16
|
-
}
|
|
17
|
-
export declare const communicationsTotalLabelsMap: (keyof CommunicationsTotalLabelsMap)[];
|
|
18
|
-
export declare const Metrics: {
|
|
19
|
-
readonly CommunicationsTotal: "diia_rabbitmq_communications_total";
|
|
20
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Options } from 'amqplib';
|
|
2
|
-
import { RecreateChannelOptions } from './messageBrokerServiceConfig';
|
|
3
|
-
export interface PublisherOptions {
|
|
4
|
-
timeout?: number;
|
|
5
|
-
replyToQueueName?: string;
|
|
6
|
-
}
|
|
7
|
-
export interface ListenerOptions {
|
|
8
|
-
queueOptions?: Options.AssertQueue;
|
|
9
|
-
prefetchCount?: number;
|
|
10
|
-
recreateChannelOptions?: RecreateChannelOptions;
|
|
11
|
-
}
|
|
12
|
-
export interface PublishDirectOptions {
|
|
13
|
-
exchangeName?: string;
|
|
14
|
-
timeout?: number;
|
|
15
|
-
ignoreCache?: boolean;
|
|
16
|
-
registryApiVersion?: string;
|
|
17
|
-
}
|
|
18
|
-
export interface PublishOptions {
|
|
19
|
-
/**
|
|
20
|
-
* Delay (ms) before message delivery
|
|
21
|
-
* @default undefined
|
|
22
|
-
*/
|
|
23
|
-
delay?: number;
|
|
24
|
-
/**
|
|
25
|
-
* Routing key for message routing
|
|
26
|
-
* @default undefined
|
|
27
|
-
*/
|
|
28
|
-
routingKey?: string;
|
|
29
|
-
/**
|
|
30
|
-
* Timeout (ms) for publish operation
|
|
31
|
-
* @default Infinity
|
|
32
|
-
*/
|
|
33
|
-
publishTimeout?: number;
|
|
34
|
-
/**
|
|
35
|
-
* Whether to throw error on timeout (true) or return false (false)
|
|
36
|
-
* @default true
|
|
37
|
-
*/
|
|
38
|
-
throwOnPublishTimeout?: boolean;
|
|
39
|
-
}
|
|
40
|
-
export interface SubscribeOptions {
|
|
41
|
-
routingKey?: string;
|
|
42
|
-
listener?: ListenerOptions;
|
|
43
|
-
/**
|
|
44
|
-
* @deprecated the RabbitMQ plugin that supports delayed messages is deprecated and should be removed in the future
|
|
45
|
-
*/
|
|
46
|
-
delayed?: boolean;
|
|
47
|
-
}
|
|
48
|
-
export interface PublishExternalEventOptions extends PublishOptions, PublishDirectOptions {
|
|
49
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Options } from 'amqplib';
|
|
2
|
-
export interface AmqpConfig {
|
|
3
|
-
protocol?: string;
|
|
4
|
-
hostname?: string;
|
|
5
|
-
port?: number;
|
|
6
|
-
username?: string;
|
|
7
|
-
password?: string;
|
|
8
|
-
heartbeat?: number;
|
|
9
|
-
}
|
|
10
|
-
export type ConnectOptions = Options.Connect;
|
|
11
|
-
export interface SocketOptions {
|
|
12
|
-
clientProperties?: Record<string, any>;
|
|
13
|
-
}
|
|
14
|
-
export interface ReconnectOptions {
|
|
15
|
-
reconnectEnabled?: boolean;
|
|
16
|
-
reconnectTimeout?: number;
|
|
17
|
-
}
|
|
18
|
-
export declare enum ConnectionStatus {
|
|
19
|
-
Init = "init",
|
|
20
|
-
Connecting = "connecting",
|
|
21
|
-
Connected = "connected",
|
|
22
|
-
Reconnecting = "reconnecting",
|
|
23
|
-
Closing = "closing",
|
|
24
|
-
Closed = "closed",
|
|
25
|
-
Down = "down"
|
|
26
|
-
}
|
|
27
|
-
export declare const AmqpConnectionEventNames: {
|
|
28
|
-
readonly Ready: "ready";
|
|
29
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { MessagePropertyHeaders } from 'amqplib/properties';
|
|
2
|
-
import { Headers } from './index';
|
|
3
|
-
export type MessagePayload = unknown;
|
|
4
|
-
export interface MessageHeaders {
|
|
5
|
-
traceId: string;
|
|
6
|
-
serviceCode?: string;
|
|
7
|
-
'x-delay'?: number;
|
|
8
|
-
}
|
|
9
|
-
export interface DirectResponseHeaders extends MessagePropertyHeaders {
|
|
10
|
-
[Headers.handledBy]?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface DirectResponse<T = unknown> extends MessagePropertyHeaders {
|
|
13
|
-
body: T;
|
|
14
|
-
headers: DirectResponseHeaders;
|
|
15
|
-
}
|
|
16
|
-
export type PublishingResult = void | never;
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import * as amqp from 'amqplib';
|
|
2
|
-
import { ErrorData } from '@diia-inhouse/errors/dist/types/interfaces';
|
|
3
|
-
import { AmqpConnection } from '../../../providers/rabbitmq/amqpConnection';
|
|
4
|
-
import { BaseQueueOptions } from '../../messageBrokerServiceConfig';
|
|
5
|
-
import { ListenerOptions } from '../../options';
|
|
6
|
-
import { EventName, QueueConfigByQueueName, ServiceConfigByConfigType, TopicConfigByConfigType } from '../../queueConfig';
|
|
7
|
-
import { ConnectOptions, ConnectionStatus, ReconnectOptions, SocketOptions } from './amqpConnection';
|
|
8
|
-
export interface RabbitMQConfigCustomParams {
|
|
9
|
-
responseRoutingKeyPrefix?: string;
|
|
10
|
-
}
|
|
11
|
-
export interface DeclareOptions {
|
|
12
|
-
assertQueues?: boolean;
|
|
13
|
-
assertExchanges?: boolean;
|
|
14
|
-
queuesOptions?: BaseQueueOptions;
|
|
15
|
-
}
|
|
16
|
-
export interface RabbitMQConfig {
|
|
17
|
-
connection: ConnectOptions;
|
|
18
|
-
socketOptions?: SocketOptions;
|
|
19
|
-
reconnectOptions?: ReconnectOptions;
|
|
20
|
-
custom?: RabbitMQConfigCustomParams;
|
|
21
|
-
listenerOptions: ListenerOptions;
|
|
22
|
-
declareOptions?: DeclareOptions;
|
|
23
|
-
/**
|
|
24
|
-
* Whether to create consumer (listener) connections. When `false`, only publisher
|
|
25
|
-
* and asserter connections are established. Defaults to `true`.
|
|
26
|
-
*/
|
|
27
|
-
consumerEnabled?: boolean;
|
|
28
|
-
}
|
|
29
|
-
export declare enum ConnectionClientType {
|
|
30
|
-
Listener = "listener",
|
|
31
|
-
Asserter = "asserter",
|
|
32
|
-
Publisher = "publisher"
|
|
33
|
-
}
|
|
34
|
-
export type ConnectionList = {
|
|
35
|
-
[k in ConnectionClientType]: {
|
|
36
|
-
lock?: Promise<AmqpConnection>;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
export interface QueueMessageMetaData {
|
|
40
|
-
date: Date;
|
|
41
|
-
xid?: string;
|
|
42
|
-
responseRoutingKey?: string;
|
|
43
|
-
ignoreCache?: boolean;
|
|
44
|
-
registryApiVersion?: string;
|
|
45
|
-
}
|
|
46
|
-
export interface QueueMessageError {
|
|
47
|
-
data: ErrorData;
|
|
48
|
-
message: string;
|
|
49
|
-
http_code: number;
|
|
50
|
-
}
|
|
51
|
-
export interface QueueMessageData<T = any> {
|
|
52
|
-
event: EventName | string;
|
|
53
|
-
payload: T;
|
|
54
|
-
meta: QueueMessageMetaData;
|
|
55
|
-
}
|
|
56
|
-
export type MessageData = Pick<QueueMessageData, 'payload' | 'event'>;
|
|
57
|
-
export declare class Message<T = unknown> {
|
|
58
|
-
data: QueueMessageData<T>;
|
|
59
|
-
constructor(data: QueueMessageData<T>);
|
|
60
|
-
}
|
|
61
|
-
export type MessageProperties = amqp.MessageProperties;
|
|
62
|
-
export interface QueueMessage {
|
|
63
|
-
id?: unknown;
|
|
64
|
-
data: QueueMessageData;
|
|
65
|
-
properties: MessageProperties;
|
|
66
|
-
done: (data?: QueueMessageData) => void;
|
|
67
|
-
reject: (nackOptions: NackOptions) => void;
|
|
68
|
-
}
|
|
69
|
-
export interface RabbitMQStatus {
|
|
70
|
-
listener?: ConnectionStatus;
|
|
71
|
-
publisher: ConnectionStatus;
|
|
72
|
-
}
|
|
73
|
-
export interface ExportConfig {
|
|
74
|
-
queues: QueueConfigByQueueName;
|
|
75
|
-
rabbit: RabbitMQConfig;
|
|
76
|
-
topics: TopicConfigByConfigType;
|
|
77
|
-
service: ServiceConfigByConfigType;
|
|
78
|
-
portalEvents: EventName[];
|
|
79
|
-
}
|
|
80
|
-
export declare const Headers: {
|
|
81
|
-
readonly sentFrom: "sent-from";
|
|
82
|
-
readonly handledBy: "handled-by";
|
|
83
|
-
};
|
|
84
|
-
export declare class NackOptions {
|
|
85
|
-
/**
|
|
86
|
-
* If requeue is truthy, the server will try to put the message or messages back on the queue or queues from which they came.
|
|
87
|
-
* Defaults to true if not given, so if you want to make sure messages are dead-lettered or discarded, supply false here.
|
|
88
|
-
*/
|
|
89
|
-
readonly requeue: boolean;
|
|
90
|
-
/**
|
|
91
|
-
* If allUpTo is truthy, all outstanding messages prior to and including the given message are rejected. Defaults to false.
|
|
92
|
-
*/
|
|
93
|
-
readonly allUpTo: boolean;
|
|
94
|
-
constructor(
|
|
95
|
-
/**
|
|
96
|
-
* If requeue is truthy, the server will try to put the message or messages back on the queue or queues from which they came.
|
|
97
|
-
* Defaults to true if not given, so if you want to make sure messages are dead-lettered or discarded, supply false here.
|
|
98
|
-
*/
|
|
99
|
-
requeue?: boolean,
|
|
100
|
-
/**
|
|
101
|
-
* If allUpTo is truthy, all outstanding messages prior to and including the given message are rejected. Defaults to false.
|
|
102
|
-
*/
|
|
103
|
-
allUpTo?: boolean);
|
|
104
|
-
}
|
|
105
|
-
export declare const Arguments: {
|
|
106
|
-
readonly queueType: "x-queue-type";
|
|
107
|
-
/**
|
|
108
|
-
* @deprecated the RabbitMQ plugin that supports delayed messages is deprecated and should be removed in the future
|
|
109
|
-
*/
|
|
110
|
-
readonly delayedType: "x-delayed-type";
|
|
111
|
-
readonly deliveryLimit: "x-delivery-limit";
|
|
112
|
-
readonly deadLetterExchange: "x-dead-letter-exchange";
|
|
113
|
-
readonly deadLetterExchangeRoutingKey: "x-dead-letter-routing-key";
|
|
114
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { ExchangeName, MessageBrokerServicesConfig } from '../messageBrokerServiceConfig';
|
|
2
|
-
export type EventName = string;
|
|
3
|
-
export type QueueName = string;
|
|
4
|
-
export declare enum QueueConfigType {
|
|
5
|
-
Internal = "internal",
|
|
6
|
-
External = "external"
|
|
7
|
-
}
|
|
8
|
-
export interface InternalServiceConfig {
|
|
9
|
-
subscribe?: QueueName[];
|
|
10
|
-
publish?: ExchangeName[];
|
|
11
|
-
}
|
|
12
|
-
export interface ExternalServiceConfig {
|
|
13
|
-
/**
|
|
14
|
-
* add an event to this field only in cases when you don't need to await a response to an event;
|
|
15
|
-
* in other cases, use the *receiveDirect* mechanism
|
|
16
|
-
* */
|
|
17
|
-
publish?: EventName[];
|
|
18
|
-
subscribe: EventName[];
|
|
19
|
-
}
|
|
20
|
-
export type ServiceConfigByConfigType = InternalServiceConfig | ExternalServiceConfig;
|
|
21
|
-
export interface ServiceConfig {
|
|
22
|
-
/**
|
|
23
|
-
* @deprecated no need to set the internal service queues config, because it is used nowhere.
|
|
24
|
-
* it should be deleted from a service config
|
|
25
|
-
* */
|
|
26
|
-
[QueueConfigType.Internal]?: InternalServiceConfig;
|
|
27
|
-
[QueueConfigType.External]?: ExternalServiceConfig;
|
|
28
|
-
}
|
|
29
|
-
export type QueueConfigByQueueName = {
|
|
30
|
-
[k in QueueName]: {
|
|
31
|
-
topics: ExchangeName[];
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
export type QueueConfig = Record<QueueConfigType.Internal, QueueConfigByQueueName>;
|
|
35
|
-
export type TopicConfigByConfigType = {
|
|
36
|
-
[k in ExchangeName]: {
|
|
37
|
-
events: EventName[];
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
export type TopicConfig = Record<QueueConfigType, TopicConfigByConfigType>;
|
|
41
|
-
export type ServiceRulesConfig = {
|
|
42
|
-
topicsConfig: TopicConfig;
|
|
43
|
-
queuesConfig: QueueConfig;
|
|
44
|
-
portalEvents?: EventName[];
|
|
45
|
-
servicesConfig?: ServiceConfig;
|
|
46
|
-
messageBrokerServices?: MessageBrokerServicesConfig;
|
|
47
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './configs';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { MessageBrokerServiceType } from './messageBrokerServiceConfig';
|
|
2
|
-
import { RabbitMQStatus } from './providers/rabbitmq';
|
|
3
|
-
export declare enum QueueConnectionType {
|
|
4
|
-
Internal = "internal",
|
|
5
|
-
External = "external"
|
|
6
|
-
}
|
|
7
|
-
export type MessageBrokerServicesStatus = Partial<Record<MessageBrokerServiceType, RabbitMQStatus>>;
|
|
8
|
-
export type QueueStatusByType = Partial<Record<QueueConnectionType, MessageBrokerServicesStatus>>;
|
|
9
|
-
export type QueueStatus = {
|
|
10
|
-
rabbit: QueueStatusByType;
|
|
11
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Replies } from 'amqplib';
|
|
2
|
-
import { Logger } from '@diia-inhouse/types';
|
|
3
|
-
import { DeclareOptions } from '../../interfaces';
|
|
4
|
-
import { BindOptions, ExchangeName, ExchangeOptions, QueueOptions, UnbindOptions } from '../../interfaces/messageBrokerServiceConfig';
|
|
5
|
-
import { QueueName } from '../../interfaces/queueConfig';
|
|
6
|
-
import { AmqpConnection } from './amqpConnection';
|
|
7
|
-
export declare class AmqpAsserter {
|
|
8
|
-
private readonly connection;
|
|
9
|
-
private readonly logger;
|
|
10
|
-
private readonly declareOptions;
|
|
11
|
-
static PrefixAlternate: string;
|
|
12
|
-
private readonly defaultExchangeType;
|
|
13
|
-
private readonly defaultQueueOptions;
|
|
14
|
-
private readonly defaultExchangeOptions;
|
|
15
|
-
private readonly defaultDeclareOptions;
|
|
16
|
-
private channel?;
|
|
17
|
-
private readonly channelName;
|
|
18
|
-
constructor(connection: AmqpConnection, logger: Logger, declareOptions?: DeclareOptions);
|
|
19
|
-
init(exchangesOptions?: ExchangeOptions[], queuesOptions?: QueueOptions[]): Promise<void>;
|
|
20
|
-
declareQueuesByJSON(declarationConfigPath: string): Promise<void>;
|
|
21
|
-
declareQueues(queuesOptions?: QueueOptions[], exchangesOptions?: ExchangeOptions[]): Promise<void>;
|
|
22
|
-
redeclareQueue(queueOptions: QueueOptions, exchangesOptions: ExchangeOptions[]): Promise<boolean>;
|
|
23
|
-
transferMessageBetweenQueues(sourceQueueName: QueueName, destinationQueueName: QueueName): Promise<void>;
|
|
24
|
-
deleteExchanges(exchangesOptions: ExchangeOptions[]): Promise<Record<ExchangeName, Replies.Empty | undefined>>;
|
|
25
|
-
deleteExchange(exchangeName: string): Promise<Replies.Empty | undefined>;
|
|
26
|
-
deleteQueues(queueNames: QueueName[]): Promise<Record<QueueName, Replies.DeleteQueue | undefined>>;
|
|
27
|
-
deleteQueue(queueName: QueueName): Promise<Replies.DeleteQueue | undefined>;
|
|
28
|
-
assertQueues(queueOptions: QueueOptions[]): Promise<Record<QueueName, Replies.AssertQueue | undefined>>;
|
|
29
|
-
assertQueue(queueOptions: QueueOptions): Promise<Replies.AssertQueue | undefined>;
|
|
30
|
-
assertExchanges(exchangeOptions: ExchangeOptions[]): Promise<Record<QueueName, Replies.AssertExchange | undefined>>;
|
|
31
|
-
assertExchange(exchangeOptions: ExchangeOptions): Promise<Replies.AssertExchange | undefined>;
|
|
32
|
-
unbindQueueFromExchanges(queueOptions: QueueOptions): Promise<undefined>;
|
|
33
|
-
bindQueueToExchange(queueName: QueueName, bindOptions: BindOptions): Promise<Replies.Empty | undefined>;
|
|
34
|
-
bindExchangeToExchanges(exchangeName: ExchangeName, bindTo: BindOptions[]): Promise<undefined>;
|
|
35
|
-
bindExchangeToExchange(exchangeName: ExchangeName, bindOptions: BindOptions): Promise<Replies.Empty | undefined>;
|
|
36
|
-
unbindQueueFromExchange(queueName: QueueName, unbindOptions: UnbindOptions): Promise<Replies.Empty | undefined>;
|
|
37
|
-
disconnect(): Promise<void>;
|
|
38
|
-
private initChannel;
|
|
39
|
-
private readConfig;
|
|
40
|
-
private assertTemporaryQueue;
|
|
41
|
-
private assertAlternateExchanges;
|
|
42
|
-
private assertAlternateQueue;
|
|
43
|
-
private prepareRedeclareQueueOptions;
|
|
44
|
-
private prepareTemporaryQueueOptions;
|
|
45
|
-
private prepareAlternateExchangesOptions;
|
|
46
|
-
private prepareAlternateExchangeOptions;
|
|
47
|
-
private prepareAlternateQueueOptions;
|
|
48
|
-
private prepareAlternateBindToQueueOption;
|
|
49
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from 'node:events';
|
|
2
|
-
import { Channel, Options } from 'amqplib';
|
|
3
|
-
import { Logger } from '@diia-inhouse/types';
|
|
4
|
-
import { ConnectionStatus, ReconnectOptions, SocketOptions } from '../../interfaces/providers/rabbitmq/amqpConnection';
|
|
5
|
-
export declare class AmqpConnection extends EventEmitter {
|
|
6
|
-
private readonly connectOptions;
|
|
7
|
-
private readonly logger;
|
|
8
|
-
private readonly reconnectOptions?;
|
|
9
|
-
private readonly socketOptions;
|
|
10
|
-
private reconnectEnabled;
|
|
11
|
-
private reconnectTimeout;
|
|
12
|
-
private connection?;
|
|
13
|
-
private connectionStatus;
|
|
14
|
-
constructor(connectOptions: Options.Connect, logger: Logger, reconnectOptions?: ReconnectOptions | undefined, socketOptions?: SocketOptions);
|
|
15
|
-
connect(): Promise<void>;
|
|
16
|
-
createChannel(queueName?: string): Promise<Channel>;
|
|
17
|
-
reconnect(): Promise<void>;
|
|
18
|
-
closeConnection(): Promise<void>;
|
|
19
|
-
getStatus(): ConnectionStatus;
|
|
20
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Logger } from '@diia-inhouse/types';
|
|
2
|
-
import { MessageHandler, QueueOptions } from '../../interfaces';
|
|
3
|
-
import { ConnectionStatus } from '../../interfaces/providers/rabbitmq/amqpConnection';
|
|
4
|
-
import { QueueName } from '../../interfaces/queueConfig';
|
|
5
|
-
import RabbitMQMetricsService from '../../services/metrics';
|
|
6
|
-
import { AmqpConnection } from './amqpConnection';
|
|
7
|
-
export declare class AmqpListener {
|
|
8
|
-
private connection;
|
|
9
|
-
private readonly logger;
|
|
10
|
-
private readonly rabbitMQMetrics;
|
|
11
|
-
private readonly queuesOptions;
|
|
12
|
-
private readonly systemServiceName;
|
|
13
|
-
private readonly infiniteRecreateChannelTriesCount;
|
|
14
|
-
private readonly defaultRecreateChannelOptions;
|
|
15
|
-
private readonly defaultPrefetchCount;
|
|
16
|
-
private queuesChannelsMap;
|
|
17
|
-
private queueRecreateChannelTriesMap;
|
|
18
|
-
private readonly defaultNackOptions;
|
|
19
|
-
private queuesCallbacksMap;
|
|
20
|
-
private queueConsumerOptionsMap;
|
|
21
|
-
private queueConsumerTagsMap;
|
|
22
|
-
private readonly nullMessage;
|
|
23
|
-
constructor(connection: AmqpConnection, logger: Logger, rabbitMQMetrics: RabbitMQMetricsService, queuesOptions: QueueOptions[] | undefined, systemServiceName: string);
|
|
24
|
-
init(): Promise<void>;
|
|
25
|
-
cancelQueue(queueName: QueueName): Promise<void>;
|
|
26
|
-
listenQueue(queueName: QueueName, callback: MessageHandler): Promise<void | never>;
|
|
27
|
-
getStatus(): ConnectionStatus;
|
|
28
|
-
private ackMsg;
|
|
29
|
-
private nackMsg;
|
|
30
|
-
private createChannelAndListenQueue;
|
|
31
|
-
private saveQueueCallback;
|
|
32
|
-
private getQueueCallback;
|
|
33
|
-
private saveChannel;
|
|
34
|
-
private onMessageCallback;
|
|
35
|
-
private handleChannelError;
|
|
36
|
-
private parseMessage;
|
|
37
|
-
private prepareResponse;
|
|
38
|
-
private finishResponseProcessing;
|
|
39
|
-
private getConsumerOptions;
|
|
40
|
-
private getQueueChannel;
|
|
41
|
-
private saveConsumerTag;
|
|
42
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Logger } from '@diia-inhouse/types';
|
|
2
|
-
import { ExchangeName } from '../../interfaces/messageBrokerServiceConfig';
|
|
3
|
-
import { PublisherOptions } from '../../interfaces/options';
|
|
4
|
-
import { QueueMessageData } from '../../interfaces/providers/rabbitmq';
|
|
5
|
-
import { ConnectionStatus } from '../../interfaces/providers/rabbitmq/amqpConnection';
|
|
6
|
-
import { MessageHeaders, PublishingResult } from '../../interfaces/providers/rabbitmq/amqpPublisher';
|
|
7
|
-
import RabbitMQMetricsService from '../../services/metrics';
|
|
8
|
-
import { AmqpConnection } from './amqpConnection';
|
|
9
|
-
export declare class AmqpPublisher {
|
|
10
|
-
private readonly connection;
|
|
11
|
-
private readonly logger;
|
|
12
|
-
private readonly rabbitMQMetrics;
|
|
13
|
-
private readonly systemServiceName;
|
|
14
|
-
private readonly defaultPublishOptions;
|
|
15
|
-
private rpcChannel?;
|
|
16
|
-
private regularChannel?;
|
|
17
|
-
private readonly replyToQueueName;
|
|
18
|
-
private eventEmitter?;
|
|
19
|
-
private readonly directResponseTimeout;
|
|
20
|
-
constructor(connection: AmqpConnection, logger: Logger, rabbitMQMetrics: RabbitMQMetricsService, systemServiceName: string, options?: PublisherOptions);
|
|
21
|
-
init(): Promise<void>;
|
|
22
|
-
publishToExchange(exchangeName: ExchangeName, message: QueueMessageData, headers: MessageHeaders, routingKey?: string): Promise<PublishingResult>;
|
|
23
|
-
publishToExchangeDirect<T>(exchangeName: ExchangeName, message: QueueMessageData, headers: MessageHeaders, routingKey?: string, responseTimeoutMs?: number): Promise<T>;
|
|
24
|
-
getStatus(): ConnectionStatus;
|
|
25
|
-
private createRegularChannel;
|
|
26
|
-
private createRpcChannel;
|
|
27
|
-
private listenReplyToQueue;
|
|
28
|
-
private publishMessage;
|
|
29
|
-
private publishRequest;
|
|
30
|
-
private publish;
|
|
31
|
-
private getPublishOptions;
|
|
32
|
-
private receiveDirectResponse;
|
|
33
|
-
private collectMetrics;
|
|
34
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
2
|
-
import { EventEmitter } from 'node:events';
|
|
3
|
-
import { MetricsService } from '@diia-inhouse/diia-metrics';
|
|
4
|
-
import { Logger } from '@diia-inhouse/types';
|
|
5
|
-
import { PublishingResult } from '../../interfaces';
|
|
6
|
-
import { MessageBrokerServiceConfig, QueueOptions } from '../../interfaces/messageBrokerServiceConfig';
|
|
7
|
-
import { MessageHandler } from '../../interfaces/messageHandler';
|
|
8
|
-
import { PublishDirectOptions, PublishOptions } from '../../interfaces/options';
|
|
9
|
-
import { ConnectionClientType, ExportConfig, QueueMessageData, RabbitMQConfig, RabbitMQStatus } from '../../interfaces/providers/rabbitmq';
|
|
10
|
-
import { EventName, QueueConfigByQueueName, QueueName, ServiceConfigByConfigType, TopicConfigByConfigType } from '../../interfaces/queueConfig';
|
|
11
|
-
import { QueueContext } from '../../interfaces/queueContext';
|
|
12
|
-
import { AmqpAsserter } from './amqpAsserter';
|
|
13
|
-
import { AmqpConnection } from './amqpConnection';
|
|
14
|
-
import { AmqpListener } from './amqpListener';
|
|
15
|
-
import { AmqpPublisher } from './amqpPublisher';
|
|
16
|
-
export declare class RabbitMQProvider extends EventEmitter {
|
|
17
|
-
private readonly systemServiceName;
|
|
18
|
-
private readonly rabbitmqConfig;
|
|
19
|
-
private readonly serviceConfig;
|
|
20
|
-
private readonly topicsConfig;
|
|
21
|
-
private readonly portalEvents;
|
|
22
|
-
private readonly logger;
|
|
23
|
-
private readonly metrics;
|
|
24
|
-
private readonly asyncLocalStorage?;
|
|
25
|
-
private readonly queuesConfig?;
|
|
26
|
-
private readonly messageBrokerServiceConfig?;
|
|
27
|
-
private initializingLock?;
|
|
28
|
-
private listener?;
|
|
29
|
-
private publisher?;
|
|
30
|
-
private asserter?;
|
|
31
|
-
private connectionList;
|
|
32
|
-
private readonly publisherIsNotInitializedErrorMsg;
|
|
33
|
-
private readonly rabbitMQMetricsService;
|
|
34
|
-
constructor(systemServiceName: string, rabbitmqConfig: RabbitMQConfig, serviceConfig: ServiceConfigByConfigType, topicsConfig: TopicConfigByConfigType, portalEvents: EventName[], logger: Logger, metrics: MetricsService, asyncLocalStorage?: AsyncLocalStorage<QueueContext> | undefined, queuesConfig?: QueueConfigByQueueName | undefined, messageBrokerServiceConfig?: MessageBrokerServiceConfig | undefined);
|
|
35
|
-
getConfig(): ExportConfig;
|
|
36
|
-
getMessageBrokerServiceConfig(): MessageBrokerServiceConfig;
|
|
37
|
-
init(config?: MessageBrokerServiceConfig): Promise<void>;
|
|
38
|
-
subscribe(queueName: QueueName, messageHandler: MessageHandler): Promise<boolean>;
|
|
39
|
-
unsubscribe(queueName: QueueName): Promise<void>;
|
|
40
|
-
publish(message: QueueMessageData, exchangeName: string, routingKey?: string, options?: PublishOptions): Promise<PublishingResult>;
|
|
41
|
-
publishExternalDirect<T>(message: QueueMessageData, exchangeName: string, routingKey?: string, options?: PublishDirectOptions): Promise<T>;
|
|
42
|
-
getStatus(): RabbitMQStatus;
|
|
43
|
-
makeAMQPConnection(client: ConnectionClientType): Promise<AmqpConnection>;
|
|
44
|
-
makeAMQPListener(queuesOptions: QueueOptions[]): Promise<AmqpListener>;
|
|
45
|
-
makeAMQPAsserter(): Promise<AmqpAsserter>;
|
|
46
|
-
makeAMQPPublisher(): Promise<AmqpPublisher>;
|
|
47
|
-
private setListener;
|
|
48
|
-
private setAsserter;
|
|
49
|
-
private setPublisher;
|
|
50
|
-
private getConnection;
|
|
51
|
-
private preparePublisherHeaders;
|
|
52
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import Logger from '@diia-inhouse/diia-logger';
|
|
2
|
-
import { ExchangeName, ExchangeOptions, Message, MessageBrokerServiceConfig, MessageBrokerServiceEventsListener, MessageData, MessageHandler, MessagePayload, PublishOptions, PublishingResult, QueueMessageData, QueueMessageMetaData } from '../interfaces';
|
|
3
|
-
import { EventName, QueueName } from '../interfaces/queueConfig';
|
|
4
|
-
import { RabbitMQProvider } from '../providers/rabbitmq';
|
|
5
|
-
import OptionsBuilder from './optionsBuilder';
|
|
6
|
-
export default abstract class Communicator {
|
|
7
|
-
protected readonly logger: Logger;
|
|
8
|
-
protected readonly queueProvider: RabbitMQProvider;
|
|
9
|
-
protected readonly hostName: string;
|
|
10
|
-
protected readonly systemServiceName: string;
|
|
11
|
-
protected readonly optionsBuilder: OptionsBuilder;
|
|
12
|
-
protected eventNameToExchangeNameMap: Map<EventName, ExchangeName>;
|
|
13
|
-
private queueBindToMap;
|
|
14
|
-
private exchangesMap;
|
|
15
|
-
private serviceConfig;
|
|
16
|
-
protected constructor(logger: Logger, queueProvider: RabbitMQProvider, hostName: string, systemServiceName: string);
|
|
17
|
-
onInit(): Promise<void>;
|
|
18
|
-
onDestroy(): Promise<void>;
|
|
19
|
-
subscribeToQueues(listeners: MessageBrokerServiceEventsListener[]): Promise<void>;
|
|
20
|
-
subscribe(queueName: QueueName, messageHandler: MessageHandler): Promise<boolean>;
|
|
21
|
-
unsubscribeFromQueues(queueNames: string[]): Promise<void>;
|
|
22
|
-
unsubscribe(queueName: QueueName): Promise<void>;
|
|
23
|
-
publishToQueue(queueName: QueueName, messageData: MessageData, options?: PublishOptions): Promise<PublishingResult>;
|
|
24
|
-
publishToExchange(exchangeName: ExchangeName, routingKey: string, messageData: MessageData | Message, options?: PublishOptions): Promise<PublishingResult>;
|
|
25
|
-
publishEventToExchange(eventName: EventName, payload: MessagePayload | Message, options?: PublishOptions): Promise<PublishingResult>;
|
|
26
|
-
getPublishQueueMessageData(eventName: EventName, message: MessagePayload, partialMeta?: Partial<QueueMessageMetaData>): QueueMessageData;
|
|
27
|
-
protected init(): Promise<MessageBrokerServiceConfig>;
|
|
28
|
-
private buildExchangesMap;
|
|
29
|
-
private buildEventNameToExchangeNameMap;
|
|
30
|
-
private getServiceConfig;
|
|
31
|
-
private unifyServiceConfig;
|
|
32
|
-
private enrichQueueConsumerOptions;
|
|
33
|
-
/**
|
|
34
|
-
* Gets global exchanges options.
|
|
35
|
-
* This method must be overridden by subclasses to provide a more specific implementation.
|
|
36
|
-
* @virtual
|
|
37
|
-
*/
|
|
38
|
-
protected abstract getProducerExchangesOptions(): ExchangeOptions[];
|
|
39
|
-
/**
|
|
40
|
-
* Gets unicast event listeners.
|
|
41
|
-
* This method must be overridden by subclasses to provide a more specific implementation.
|
|
42
|
-
* @virtual
|
|
43
|
-
*/
|
|
44
|
-
protected abstract getUnicastListeners(): MessageBrokerServiceEventsListener[];
|
|
45
|
-
/**
|
|
46
|
-
* Gets multicast event listeners.
|
|
47
|
-
* This method must be overridden by subclasses to provide a more specific implementation.
|
|
48
|
-
* @virtual
|
|
49
|
-
*/
|
|
50
|
-
protected abstract getMulticastListeners(): MessageBrokerServiceEventsListener[];
|
|
51
|
-
/**
|
|
52
|
-
* Gets an exchange name related to a service.
|
|
53
|
-
* This method must be overridden by subclasses to provide a more specific implementation.
|
|
54
|
-
* @virtual
|
|
55
|
-
*/
|
|
56
|
-
protected abstract getExchangeNameWithSuffix(exchangeName: ExchangeName): string;
|
|
57
|
-
}
|