@signageos/lib 23.9.1 → 23.9.2
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/README.md +2 -2
- package/dist/AMQP/CQRS/ICommand.d.ts +3 -36
- package/dist/AMQP/CQRS/ICommand.js +18 -0
- package/dist/AMQP/CQRS/ICommand.js.map +1 -1
- package/dist/AMQP/CQRS/ICommandError.d.ts +4 -4
- package/dist/AMQP/CQRS/commandQueue.d.ts +4 -59
- package/dist/AMQP/CQRS/commandQueue.js +16 -308
- package/dist/AMQP/CQRS/commandQueue.js.map +1 -1
- package/dist/AMQP/CQRS/commandResponseHelper.d.ts +4 -3
- package/dist/AMQP/CQRS/commandResponseHelper.js +18 -5
- package/dist/AMQP/CQRS/commandResponseHelper.js.map +1 -1
- package/dist/AMQP/CQRS/storedCommandQueue.d.ts +4 -27
- package/dist/AMQP/CQRS/storedCommandQueue.js +16 -296
- package/dist/AMQP/CQRS/storedCommandQueue.js.map +1 -1
- package/dist/AMQP/ChannelProvider.d.ts +5 -37
- package/dist/AMQP/ChannelProvider.js +9 -868
- package/dist/AMQP/ChannelProvider.js.map +1 -1
- package/dist/AMQP/DeviceActions/Bridge/deviceActionBridgeFactory.d.ts +4 -39
- package/dist/AMQP/DeviceActions/Bridge/deviceActionBridgeFactory.js +16 -287
- package/dist/AMQP/DeviceActions/Bridge/deviceActionBridgeFactory.js.map +1 -1
- package/dist/AMQP/DeviceActions/IDeviceAction.d.ts +4 -4
- package/dist/AMQP/DeviceActions/deviceActionsQueue.d.ts +2 -81
- package/dist/AMQP/DeviceActions/deviceActionsQueue.js +14 -531
- package/dist/AMQP/DeviceActions/deviceActionsQueue.js.map +1 -1
- package/dist/AMQP/EventSourcing/EventConsumer/AmqpEventConsumer.d.ts +2 -45
- package/dist/AMQP/EventSourcing/EventConsumer/AmqpEventConsumer.js +14 -211
- package/dist/AMQP/EventSourcing/EventConsumer/AmqpEventConsumer.js.map +1 -1
- package/dist/AMQP/EventSourcing/EventConsumer/IEventConsumer.d.ts +2 -11
- package/dist/AMQP/EventSourcing/EventConsumer/IEventConsumer.js +18 -0
- package/dist/AMQP/EventSourcing/EventConsumer/IEventConsumer.js.map +1 -1
- package/dist/AMQP/EventSourcing/EventConsumer/InMemoryEventConsumer.d.ts +2 -13
- package/dist/AMQP/EventSourcing/EventConsumer/InMemoryEventConsumer.js +14 -69
- package/dist/AMQP/EventSourcing/EventConsumer/InMemoryEventConsumer.js.map +1 -1
- package/dist/AMQP/EventSourcing/IEvent.d.ts +3 -70
- package/dist/AMQP/EventSourcing/IEvent.js +18 -0
- package/dist/AMQP/EventSourcing/IEvent.js.map +1 -1
- package/dist/AMQP/EventSourcing/Locked/deferredState.d.ts +2 -19
- package/dist/AMQP/EventSourcing/Locked/deferredState.js +15 -66
- package/dist/AMQP/EventSourcing/Locked/deferredState.js.map +1 -1
- package/dist/AMQP/EventSourcing/Locked/lockedEventConsumer.d.ts +2 -68
- package/dist/AMQP/EventSourcing/Locked/lockedEventConsumer.js +14 -429
- package/dist/AMQP/EventSourcing/Locked/lockedEventConsumer.js.map +1 -1
- package/dist/AMQP/EventSourcing/Locked/rejectedTimestamps.d.ts +2 -22
- package/dist/AMQP/EventSourcing/Locked/rejectedTimestamps.js +16 -59
- package/dist/AMQP/EventSourcing/Locked/rejectedTimestamps.js.map +1 -1
- package/dist/AMQP/EventSourcing/Locked/withLock.d.ts +2 -40
- package/dist/AMQP/EventSourcing/Locked/withLock.js +14 -134
- package/dist/AMQP/EventSourcing/Locked/withLock.js.map +1 -1
- package/dist/AMQP/EventSourcing/eventQueue.d.ts +2 -85
- package/dist/AMQP/EventSourcing/eventQueue.js +14 -132
- package/dist/AMQP/EventSourcing/eventQueue.js.map +1 -1
- package/dist/AMQP/EventSourcing/eventQueue.utils.d.ts +2 -71
- package/dist/AMQP/EventSourcing/eventQueue.utils.js +16 -152
- package/dist/AMQP/EventSourcing/eventQueue.utils.js.map +1 -1
- package/dist/AMQP/EventSourcing/eventQueueDetached.d.ts +2 -47
- package/dist/AMQP/EventSourcing/eventQueueDetached.js +14 -421
- package/dist/AMQP/EventSourcing/eventQueueDetached.js.map +1 -1
- package/dist/AMQP/EventSourcing/eventQueueDomain.d.ts +2 -53
- package/dist/AMQP/EventSourcing/eventQueueDomain.js +14 -611
- package/dist/AMQP/EventSourcing/eventQueueDomain.js.map +1 -1
- package/dist/AMQP/EventSourcing/eventQueuePublish.d.ts +2 -17
- package/dist/AMQP/EventSourcing/eventQueuePublish.js +14 -202
- package/dist/AMQP/EventSourcing/eventQueuePublish.js.map +1 -1
- package/dist/AMQP/EventSourcing/synchronization.d.ts +2 -37
- package/dist/AMQP/EventSourcing/synchronization.js +18 -9
- package/dist/AMQP/EventSourcing/synchronization.js.map +1 -1
- package/dist/AMQP/Exchange.d.ts +4 -1
- package/dist/AMQP/Exchange.js +18 -0
- package/dist/AMQP/Exchange.js.map +1 -1
- package/dist/AMQP/IAsyncGotMessage.d.ts +2 -13
- package/dist/AMQP/IAsyncGotMessage.js +18 -0
- package/dist/AMQP/IAsyncGotMessage.js.map +1 -1
- package/dist/AMQP/IChannel.d.ts +5 -43
- package/dist/AMQP/IChannel.js +18 -0
- package/dist/AMQP/IChannel.js.map +1 -1
- package/dist/AMQP/IConsumeOptions.d.ts +5 -106
- package/dist/AMQP/IConsumeOptions.js +18 -0
- package/dist/AMQP/IConsumeOptions.js.map +1 -1
- package/dist/AMQP/IMessageOptions.d.ts +5 -6
- package/dist/AMQP/IMessageOptions.js +18 -0
- package/dist/AMQP/IMessageOptions.js.map +1 -1
- package/dist/AMQP/INackOptions.d.ts +5 -4
- package/dist/AMQP/INackOptions.js +18 -0
- package/dist/AMQP/INackOptions.js.map +1 -1
- package/dist/AMQP/IQueueOptions.d.ts +5 -8
- package/dist/AMQP/IQueueOptions.js +18 -0
- package/dist/AMQP/IQueueOptions.js.map +1 -1
- package/dist/AMQP/Logging/IDeviceLog.d.ts +4 -15
- package/dist/AMQP/Logging/IDeviceLog.js +18 -7
- package/dist/AMQP/Logging/IDeviceLog.js.map +1 -1
- package/dist/AMQP/Logging/logDeviceQueue.d.ts +4 -12
- package/dist/AMQP/Logging/logDeviceQueue.js +16 -102
- package/dist/AMQP/Logging/logDeviceQueue.js.map +1 -1
- package/dist/AMQP/QueueFetcher.d.ts +3 -11
- package/dist/AMQP/QueueFetcher.js +17 -156
- package/dist/AMQP/QueueFetcher.js.map +1 -1
- package/dist/AMQP/QueuePublisher.d.ts +5 -7
- package/dist/AMQP/QueuePublisher.js +19 -127
- package/dist/AMQP/QueuePublisher.js.map +1 -1
- package/dist/AMQP/QueueRepeatableSubscription.d.ts +5 -14
- package/dist/AMQP/QueueRepeatableSubscription.js +19 -154
- package/dist/AMQP/QueueRepeatableSubscription.js.map +1 -1
- package/dist/AMQP/QueueSubscriber.d.ts +5 -27
- package/dist/AMQP/QueueSubscriber.js +9 -303
- package/dist/AMQP/QueueSubscriber.js.map +1 -1
- package/dist/AMQP/ResponseProvider.d.ts +4 -20
- package/dist/AMQP/ResponseProvider.js +16 -188
- package/dist/AMQP/ResponseProvider.js.map +1 -1
- package/dist/AMQP/Static/filesQueue.d.ts +4 -12
- package/dist/AMQP/Static/filesQueue.js +6 -205
- package/dist/AMQP/Static/filesQueue.js.map +1 -1
- package/dist/AMQP/amqpConnectionFactory.d.ts +2 -25
- package/dist/AMQP/amqpConnectionFactory.js +4 -219
- package/dist/AMQP/amqpConnectionFactory.js.map +1 -1
- package/dist/AMQP/amqpErrors.d.ts +4 -5
- package/dist/AMQP/amqpErrors.js +18 -27
- package/dist/AMQP/amqpErrors.js.map +1 -1
- package/dist/AMQP/errors.d.ts +4 -3
- package/dist/AMQP/errors.js +18 -27
- package/dist/AMQP/errors.js.map +1 -1
- package/dist/AMQP/fetchNextMessage.d.ts +3 -12
- package/dist/AMQP/fetchNextMessage.js +20 -111
- package/dist/AMQP/fetchNextMessage.js.map +1 -1
- package/dist/AMQP/queueConfigurator.d.ts +2 -3
- package/dist/AMQP/queueConfigurator.js +14 -71
- package/dist/AMQP/queueConfigurator.js.map +1 -1
- package/dist/DateTime/waitUntil.d.ts +4 -15
- package/dist/DateTime/waitUntil.js +17 -139
- package/dist/DateTime/waitUntil.js.map +1 -1
- package/dist/Events/AsyncEventEmitter.d.ts +2 -29
- package/dist/Events/AsyncEventEmitter.js +14 -118
- package/dist/Events/AsyncEventEmitter.js.map +1 -1
- package/dist/Events/eventsHelpers.d.ts +4 -3
- package/dist/Events/eventsHelpers.js +18 -21
- package/dist/Events/eventsHelpers.js.map +1 -1
- package/dist/Hash/checksum.d.ts +2 -3
- package/dist/Hash/checksum.js +16 -15
- package/dist/Hash/checksum.js.map +1 -1
- package/dist/Hash/checksumFile.d.ts +2 -2
- package/dist/Hash/checksumFile.js +4 -65
- package/dist/Hash/checksumFile.js.map +1 -1
- package/dist/Hash/generator.d.ts +4 -2
- package/dist/Hash/generator.js +18 -12
- package/dist/Hash/generator.js.map +1 -1
- package/dist/HttpStatus/checks/amqpStatusCheck.d.ts +1 -1
- package/dist/HttpStatus/statuses/amqpStatus.d.ts +1 -1
- package/dist/Metrics/MetricsClient.d.ts +2 -44
- package/dist/Metrics/MetricsClient.js +6 -86
- package/dist/Metrics/MetricsClient.js.map +1 -1
- package/dist/Metrics/metrics.d.ts +2 -82
- package/dist/Metrics/metrics.js +4 -238
- package/dist/Metrics/metrics.js.map +1 -1
- package/dist/Metrics/processSocketsMetrics.d.ts +4 -10
- package/dist/Metrics/processSocketsMetrics.js +17 -88
- package/dist/Metrics/processSocketsMetrics.js.map +1 -1
- package/dist/Service/dbConnections.d.ts +1 -1
- package/dist/Service/metrics/connections.js +7 -7
- package/dist/Service/metrics/connections.js.map +1 -1
- package/dist/ThirdParty/connection.d.ts +0 -11
- package/package.json +5 -9
- package/dist/AMQP/IAMQPPool.d.ts +0 -5
- package/dist/AMQP/IAMQPPool.js +0 -3
- package/dist/AMQP/IAMQPPool.js.map +0 -1
- package/dist/Events/genericGracefulExit.d.ts +0 -11
- package/dist/Events/genericGracefulExit.js +0 -90
- package/dist/Events/genericGracefulExit.js.map +0 -1
- package/dist/GenericPool/options.d.ts +0 -63
- package/dist/GenericPool/options.js +0 -3
- package/dist/GenericPool/options.js.map +0 -1
- package/dist/Metrics/deviceConsumerMetrics.d.ts +0 -6
- package/dist/Metrics/deviceConsumerMetrics.js +0 -59
- package/dist/Metrics/deviceConsumerMetrics.js.map +0 -1
- package/dist/Metrics/eventConsumerMetrics.d.ts +0 -19
- package/dist/Metrics/eventConsumerMetrics.js +0 -52
- package/dist/Metrics/eventConsumerMetrics.js.map +0 -1
- package/dist/Metrics/eventQueueMetrics.d.ts +0 -7
- package/dist/Metrics/eventQueueMetrics.js +0 -19
- package/dist/Metrics/eventQueueMetrics.js.map +0 -1
- package/dist/Pool/IBasePool.d.ts +0 -6
- package/dist/Pool/IBasePool.js +0 -3
- package/dist/Pool/IBasePool.js.map +0 -1
- package/dist/System/signalSender.d.ts +0 -1
- package/dist/System/signalSender.js +0 -7
- package/dist/System/signalSender.js.map +0 -1
|
@@ -1,157 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
36
7
|
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
15
|
};
|
|
38
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
exports.parseQueueName = parseQueueName;
|
|
44
|
-
exports.getBasicEventRoutingKey = getBasicEventRoutingKey;
|
|
45
|
-
exports.purgeQueue = purgeQueue;
|
|
46
|
-
exports.deleteQueues = deleteQueues;
|
|
47
|
-
// Constants
|
|
48
|
-
exports.EXCHANGE_PREFIX = 'events';
|
|
49
|
-
/** @deprecated Use @signageos/user-domain-model/dist/Lib/CQRS/commandSynchronization instead */
|
|
50
|
-
exports.EXCHANGE_NOTIFICATIONS_PREFIX = 'events_notifications';
|
|
51
|
-
/** Alternate exchange for events (currently unused) */
|
|
52
|
-
exports.FAILED_EXCHANGE_NAME = 'events_failed';
|
|
53
|
-
/** Rejected exchange for (currently domain only) queues. Detached queue uses "__rejected." prefix for backwards compatibility reason */
|
|
54
|
-
exports.REJECTED_EXCHANGE_NAME = 'events_rejected';
|
|
55
|
-
exports.OPTIONS = {
|
|
56
|
-
persistent: true,
|
|
57
|
-
confirmable: true,
|
|
58
|
-
prefetchCount: 1,
|
|
59
|
-
};
|
|
60
|
-
// Utility functions
|
|
61
|
-
function getConsumeOptionsByBindOptions(options) {
|
|
62
|
-
return {
|
|
63
|
-
autoDelete: typeof options.persistent !== 'undefined' ? !options.persistent : false,
|
|
64
|
-
exclusive: typeof options.exclusive !== 'undefined' ? options.exclusive : false,
|
|
65
|
-
redeliverDelayMs: typeof options.redeliverDelayMs !== 'undefined' ? options.redeliverDelayMs : 1e3,
|
|
66
|
-
suppressFirstError: typeof options.suppressFirstError !== 'undefined' ? options.suppressFirstError : false,
|
|
67
|
-
singleActiveConsumer: options.singleActiveConsumer,
|
|
68
|
-
deadLetterIfRedeliveredAndErred: options.deadLetterIfRedeliveredAndErred,
|
|
69
|
-
deadLetterIfErred: options.deadLetterIfErred,
|
|
70
|
-
queueType: typeof options.queueType !== 'undefined' ? options.queueType : 'quorum', // default for event queues are swapped
|
|
71
|
-
durable: typeof options.durable !== 'undefined' ? options.durable : true,
|
|
72
|
-
maxLength: typeof options.maxLength !== 'undefined' ? options.maxLength : undefined,
|
|
73
|
-
overflow: typeof options.overflow !== 'undefined' ? options.overflow : undefined,
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
function getExchangeName(options, eventType) {
|
|
77
|
-
var prefix = options.notification ? exports.EXCHANGE_NOTIFICATIONS_PREFIX : exports.EXCHANGE_PREFIX;
|
|
78
|
-
return "".concat(prefix, "-").concat(eventType);
|
|
79
|
-
}
|
|
80
|
-
function getQueueName(consumerType, queueIdentification) {
|
|
81
|
-
return consumerType + '_' + queueIdentification;
|
|
82
|
-
}
|
|
83
|
-
function parseQueueName(consumerType, queueName) {
|
|
84
|
-
var queueIdentification = queueName.substring(consumerType.length + 1);
|
|
85
|
-
var expectedQueueName = getQueueName(consumerType, queueIdentification);
|
|
86
|
-
if (expectedQueueName !== queueName) {
|
|
87
|
-
throw new Error("Incorrect queue name cannot be parsed: ".concat(consumerType, ", ").concat(queueName));
|
|
88
|
-
}
|
|
89
|
-
return queueIdentification;
|
|
90
|
-
}
|
|
91
|
-
function escapeEventTypeForRoutingKey(eventType) {
|
|
92
|
-
return eventType.replace(/\./g, '_');
|
|
93
|
-
}
|
|
94
|
-
function getBasicEventRoutingKey(eventType) {
|
|
95
|
-
return 'event.' + escapeEventTypeForRoutingKey(eventType);
|
|
96
|
-
}
|
|
97
|
-
function purgeQueue(amqpConnection, queueIdentification, consumerType) {
|
|
98
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
99
|
-
var queueName, channel;
|
|
100
|
-
return __generator(this, function (_a) {
|
|
101
|
-
switch (_a.label) {
|
|
102
|
-
case 0:
|
|
103
|
-
queueName = getQueueName(consumerType, queueIdentification);
|
|
104
|
-
return [4 /*yield*/, amqpConnection.channelProvider.getChannel(queueIdentification)];
|
|
105
|
-
case 1:
|
|
106
|
-
channel = _a.sent();
|
|
107
|
-
_a.label = 2;
|
|
108
|
-
case 2:
|
|
109
|
-
_a.trys.push([2, , 4, 6]);
|
|
110
|
-
return [4 /*yield*/, channel.purge(queueName)];
|
|
111
|
-
case 3:
|
|
112
|
-
_a.sent();
|
|
113
|
-
return [3 /*break*/, 6];
|
|
114
|
-
case 4: return [4 /*yield*/, channel.close()];
|
|
115
|
-
case 5:
|
|
116
|
-
_a.sent();
|
|
117
|
-
return [7 /*endfinally*/];
|
|
118
|
-
case 6: return [2 /*return*/];
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
function deleteQueues(amqpConnection, queueIdentifications, consumerType) {
|
|
124
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
125
|
-
var _i, queueIdentifications_1, queueIdentification, queueName, channel;
|
|
126
|
-
return __generator(this, function (_a) {
|
|
127
|
-
switch (_a.label) {
|
|
128
|
-
case 0:
|
|
129
|
-
_i = 0, queueIdentifications_1 = queueIdentifications;
|
|
130
|
-
_a.label = 1;
|
|
131
|
-
case 1:
|
|
132
|
-
if (!(_i < queueIdentifications_1.length)) return [3 /*break*/, 8];
|
|
133
|
-
queueIdentification = queueIdentifications_1[_i];
|
|
134
|
-
queueName = getQueueName(consumerType, queueIdentification);
|
|
135
|
-
return [4 /*yield*/, amqpConnection.channelProvider.getChannel(queueIdentification)];
|
|
136
|
-
case 2:
|
|
137
|
-
channel = _a.sent();
|
|
138
|
-
_a.label = 3;
|
|
139
|
-
case 3:
|
|
140
|
-
_a.trys.push([3, , 5, 7]);
|
|
141
|
-
return [4 /*yield*/, channel.delete(queueName)];
|
|
142
|
-
case 4:
|
|
143
|
-
_a.sent();
|
|
144
|
-
return [3 /*break*/, 7];
|
|
145
|
-
case 5: return [4 /*yield*/, channel.close()];
|
|
146
|
-
case 6:
|
|
147
|
-
_a.sent();
|
|
148
|
-
return [7 /*endfinally*/];
|
|
149
|
-
case 7:
|
|
150
|
-
_i++;
|
|
151
|
-
return [3 /*break*/, 1];
|
|
152
|
-
case 8: return [2 /*return*/];
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
});
|
|
156
|
-
}
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Use `@signageos/amqp` instead.
|
|
19
|
+
*/
|
|
20
|
+
__exportStar(require("@signageos/amqp/dist/EventSourcing/eventQueue.utils"), exports);
|
|
157
21
|
//# sourceMappingURL=eventQueue.utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventQueue.utils.js","sourceRoot":"","sources":["../../../src/AMQP/EventSourcing/eventQueue.utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"eventQueue.utils.js","sourceRoot":"","sources":["../../../src/AMQP/EventSourcing/eventQueue.utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,sFAAoE"}
|
|
@@ -1,49 +1,4 @@
|
|
|
1
|
-
import { IAMQPConnection } from '../amqpConnectionFactory';
|
|
2
|
-
import INackOptions from '../INackOptions';
|
|
3
|
-
import IEvent, { IEventPayload } from './IEvent';
|
|
4
|
-
import { IBindOptions, IRejectedRedeliverOptions } from './eventQueue.utils';
|
|
5
|
-
export interface IEventDetachedMessage<TPayload extends IEventPayload> {
|
|
6
|
-
event: IEvent<TPayload>;
|
|
7
|
-
ack(): Promise<void>;
|
|
8
|
-
nack(nackOptions?: INackOptions): Promise<void>;
|
|
9
|
-
}
|
|
10
1
|
/**
|
|
11
|
-
*
|
|
2
|
+
* @deprecated Use `@signageos/amqp` instead.
|
|
12
3
|
*/
|
|
13
|
-
export
|
|
14
|
-
/**
|
|
15
|
-
* Fetch on event which were rejected with enqueue=false by bindDetached function (the detached type only).
|
|
16
|
-
* Returns message containing event which has to by explicitly acked/nacked.
|
|
17
|
-
*/
|
|
18
|
-
export declare function fetchRejectedDetached(amqpConnection: IAMQPConnection, eventType: string, consumerType: string): Promise<IEventDetachedMessage<IEventPayload> | null>;
|
|
19
|
-
/**
|
|
20
|
-
* Fetches events from a detached queue in batches without automatic acknowledgment.
|
|
21
|
-
* Each returned message must be explicitly acknowledged or negative acknowledged.
|
|
22
|
-
*/
|
|
23
|
-
export declare function fetchDetached<TPayload extends IEventPayload>(amqpConnection: IAMQPConnection, eventType: string, consumerType: string, options?: IBindOptions, maxMessages?: number): Promise<IEventDetachedMessage<TPayload>[]>;
|
|
24
|
-
/**
|
|
25
|
-
* Binds to an event queue in detached mode, processing events one by one.
|
|
26
|
-
* Events are automatically acknowledged upon successful processing.
|
|
27
|
-
*/
|
|
28
|
-
export declare function bindDetached<TPayload extends IEventPayload>(amqpConnection: IAMQPConnection, eventType: string, consumerType: string, onEvent: (event: IEvent<TPayload>) => Promise<void>, options?: IBindOptions): Promise<import("../QueueSubscriber").ICancelConsumption>;
|
|
29
|
-
/**
|
|
30
|
-
* Binds to an event queue in detached batch mode, processing multiple events together.
|
|
31
|
-
* Fetches additional events up to prefetch count and processes them as a batch.
|
|
32
|
-
* All events in the batch are acknowledged or nacked together.
|
|
33
|
-
*/
|
|
34
|
-
export declare function bindDetachedBatch<TPayload extends IEventPayload>(amqpConnection: IAMQPConnection, eventType: string, consumerType: string, onEvents: (events: IEvent<TPayload>[]) => Promise<void>, options?: IBindOptions): Promise<import("../QueueSubscriber").ICancelConsumption>;
|
|
35
|
-
/**
|
|
36
|
-
* Binds to an event queue in detached mode with manual acknowledgment control.
|
|
37
|
-
* The event handler receives explicit ack and nack functions for fine-grained control.
|
|
38
|
-
*/
|
|
39
|
-
export declare function bindDetachedExpectingConfirmation<TPayload extends IEventPayload>(amqpConnection: IAMQPConnection, eventType: string, consumerType: string, onEvent: (event: IEvent<TPayload>, ack: () => Promise<void>, nack: (options?: INackOptions) => void) => Promise<void>, options?: IBindOptions): Promise<import("../QueueSubscriber").ICancelConsumption>;
|
|
40
|
-
/**
|
|
41
|
-
* Prepares event queues and exchanges for detached event processing without starting consumption.
|
|
42
|
-
* Useful for initializing infrastructure before actual event processing begins.
|
|
43
|
-
*/
|
|
44
|
-
export declare function prepareDetached(amqpConnection: IAMQPConnection, eventTypes: string[], consumerType: string, options?: IBindOptions): Promise<void>;
|
|
45
|
-
/**
|
|
46
|
-
* Prepares rejected event queue infrastructure for detached event processing without starting consumption.
|
|
47
|
-
* Sets up the queue for handling previously rejected events that need reprocessing.
|
|
48
|
-
*/
|
|
49
|
-
export declare function prepareRejectedDetached(amqpConnection: IAMQPConnection, eventType: string, consumerType: string, redeliverOptions: IRejectedRedeliverOptions, bindOptions?: IBindOptions): Promise<void>;
|
|
4
|
+
export * from '@signageos/amqp/dist/EventSourcing/eventQueueDetached';
|