@autofleet/rabbit 3.3.0-beta.4 → 3.3.0
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/.nvmrc +1 -1
- package/dist/index.d.ts +35 -13
- package/dist/index.js +485 -119
- package/dist/lib/consts.d.ts +2 -4
- package/dist/lib/consts.js +3 -6
- package/dist/lib/types.d.ts +1 -8
- package/package.json +1 -1
- package/src/index.ts +584 -153
- package/src/lib/consts.ts +2 -5
- package/src/lib/types.ts +2 -9
package/dist/lib/consts.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export declare const USER_TRACING_HEADER = "x-af-user-id";
|
|
|
6
6
|
export declare const AUTOMATION_ID_HEADER = "x-af-automation-id";
|
|
7
7
|
export declare const USER_OBJECT = "userObject";
|
|
8
8
|
export declare const DEFAULT_USE_CONSUME_WITH_LOCK = false;
|
|
9
|
+
export declare const CONNECTION_CREATED_CONST = "connectionCreated";
|
|
10
|
+
export declare const CONNECTION_FAILED_CONST = "connectionFailed";
|
|
9
11
|
export declare const DEFAULT_OPTIONS: {
|
|
10
12
|
limit: number;
|
|
11
13
|
retries: number;
|
|
@@ -15,7 +17,3 @@ export declare const DEFAULT_OPTIONS: {
|
|
|
15
17
|
auditContext: null;
|
|
16
18
|
enableRabbitTrace: boolean;
|
|
17
19
|
};
|
|
18
|
-
export declare enum ConnectionPurpose {
|
|
19
|
-
Consume = "consume",
|
|
20
|
-
Publish = "publish"
|
|
21
|
-
}
|
package/dist/lib/consts.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.DEFAULT_OPTIONS = exports.CONNECTION_FAILED_CONST = exports.CONNECTION_CREATED_CONST = exports.DEFAULT_USE_CONSUME_WITH_LOCK = exports.USER_OBJECT = exports.AUTOMATION_ID_HEADER = exports.USER_TRACING_HEADER = exports.TRACING_HEADER = exports.RETRY_HEADER = exports.DEFAULT_LOCK_TIMEOUT = exports.DEFAULT_DEAD_TTL_TWO_DAYS = void 0;
|
|
4
4
|
exports.DEFAULT_DEAD_TTL_TWO_DAYS = 60000 * 60 * 12;
|
|
5
5
|
exports.DEFAULT_LOCK_TIMEOUT = 1000 * 5;
|
|
6
6
|
exports.RETRY_HEADER = 'x-retry-count';
|
|
@@ -9,6 +9,8 @@ exports.USER_TRACING_HEADER = 'x-af-user-id';
|
|
|
9
9
|
exports.AUTOMATION_ID_HEADER = 'x-af-automation-id';
|
|
10
10
|
exports.USER_OBJECT = 'userObject';
|
|
11
11
|
exports.DEFAULT_USE_CONSUME_WITH_LOCK = false;
|
|
12
|
+
exports.CONNECTION_CREATED_CONST = 'connectionCreated';
|
|
13
|
+
exports.CONNECTION_FAILED_CONST = 'connectionFailed';
|
|
12
14
|
exports.DEFAULT_OPTIONS = {
|
|
13
15
|
limit: 1,
|
|
14
16
|
retries: 1,
|
|
@@ -18,8 +20,3 @@ exports.DEFAULT_OPTIONS = {
|
|
|
18
20
|
auditContext: null,
|
|
19
21
|
enableRabbitTrace: false,
|
|
20
22
|
};
|
|
21
|
-
var ConnectionPurpose;
|
|
22
|
-
(function (ConnectionPurpose) {
|
|
23
|
-
ConnectionPurpose["Consume"] = "consume";
|
|
24
|
-
ConnectionPurpose["Publish"] = "publish";
|
|
25
|
-
})(ConnectionPurpose = exports.ConnectionPurpose || (exports.ConnectionPurpose = {}));
|
package/dist/lib/types.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { AmqpConnectionManager } from 'amqp-connection-manager';
|
|
2
1
|
import { ConsumeMessage, Options, Replies } from 'amqplib';
|
|
3
2
|
export interface ExchangesCache {
|
|
4
3
|
[key: string]: any;
|
|
@@ -26,6 +25,7 @@ export interface ConsumeOptions {
|
|
|
26
25
|
useConsumeWithLock?: boolean;
|
|
27
26
|
auditContext?: any;
|
|
28
27
|
enableRabbitTrace?: boolean;
|
|
28
|
+
isQuorumQueue?: boolean;
|
|
29
29
|
}
|
|
30
30
|
export type CallbackFunction = (msg: ConsumeMessage, ack: any, nack: any) => Promise<any>;
|
|
31
31
|
export type newChannelOpts = {
|
|
@@ -42,10 +42,3 @@ export type AfConsumer = {
|
|
|
42
42
|
options: ConsumeOptions | undefined;
|
|
43
43
|
};
|
|
44
44
|
export declare const CONSUMER_DEFAULT_OPTIONS: Options.Consume;
|
|
45
|
-
export type ConnectionData = {
|
|
46
|
-
connection: AmqpConnectionManager | null;
|
|
47
|
-
creatingConnection: boolean;
|
|
48
|
-
connectionCreatedEventName: string;
|
|
49
|
-
connectionFailedEventName: string;
|
|
50
|
-
blockReconnect: boolean;
|
|
51
|
-
};
|