@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,428 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
|
-
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;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
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]; } };
|
|
47
7
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
if (
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
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);
|
|
57
15
|
};
|
|
58
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59
|
-
exports.bindRejectedDetached = bindRejectedDetached;
|
|
60
|
-
exports.fetchRejectedDetached = fetchRejectedDetached;
|
|
61
|
-
exports.fetchDetached = fetchDetached;
|
|
62
|
-
exports.bindDetached = bindDetached;
|
|
63
|
-
exports.bindDetachedBatch = bindDetachedBatch;
|
|
64
|
-
exports.bindDetachedExpectingConfirmation = bindDetachedExpectingConfirmation;
|
|
65
|
-
exports.prepareDetached = prepareDetached;
|
|
66
|
-
exports.prepareRejectedDetached = prepareRejectedDetached;
|
|
67
|
-
var ChannelProvider_1 = require("../ChannelProvider");
|
|
68
|
-
var eventQueue_utils_1 = require("./eventQueue.utils");
|
|
69
|
-
function convertAsyncGotMessageToEventDetachedMessage(asyncGotMessage) {
|
|
70
|
-
return {
|
|
71
|
-
event: asyncGotMessage.message,
|
|
72
|
-
ack: asyncGotMessage.ack,
|
|
73
|
-
nack: asyncGotMessage.nack,
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
var createBindDetachedChannel = function (amqpConnection, eventType, exchangeName, options) { return function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
77
|
-
var channel;
|
|
78
|
-
return __generator(this, function (_a) {
|
|
79
|
-
switch (_a.label) {
|
|
80
|
-
case 0: return [4 /*yield*/, amqpConnection.channelProvider.getChannel(eventType, __assign(__assign({}, eventQueue_utils_1.OPTIONS), { prefetchCount: options.prefetchCount || eventQueue_utils_1.OPTIONS.prefetchCount }))];
|
|
81
|
-
case 1:
|
|
82
|
-
channel = _a.sent();
|
|
83
|
-
return [4 /*yield*/, channel.assertExchange(eventQueue_utils_1.FAILED_EXCHANGE_NAME, 'direct')];
|
|
84
|
-
case 2:
|
|
85
|
-
_a.sent();
|
|
86
|
-
return [4 /*yield*/, channel.assertExchange(exchangeName, 'fanout', { alternateExchange: eventQueue_utils_1.FAILED_EXCHANGE_NAME })];
|
|
87
|
-
case 3:
|
|
88
|
-
_a.sent();
|
|
89
|
-
return [2 /*return*/, channel];
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
}); }; };
|
|
93
|
-
var createBindDetachedBatchChannel = function (amqpConnection, eventType, exchangeName) { return function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
94
|
-
var channel;
|
|
95
|
-
return __generator(this, function (_a) {
|
|
96
|
-
switch (_a.label) {
|
|
97
|
-
case 0: return [4 /*yield*/, amqpConnection.channelProvider.getChannel('batch.' + eventType, __assign(__assign({}, eventQueue_utils_1.OPTIONS), { prefetchCount: 1 }))];
|
|
98
|
-
case 1:
|
|
99
|
-
channel = _a.sent();
|
|
100
|
-
return [4 /*yield*/, channel.assertExchange(eventQueue_utils_1.FAILED_EXCHANGE_NAME, 'direct')];
|
|
101
|
-
case 2:
|
|
102
|
-
_a.sent();
|
|
103
|
-
return [4 /*yield*/, channel.assertExchange(exchangeName, 'fanout', { alternateExchange: eventQueue_utils_1.FAILED_EXCHANGE_NAME })];
|
|
104
|
-
case 3:
|
|
105
|
-
_a.sent();
|
|
106
|
-
return [2 /*return*/, channel];
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
}); }; };
|
|
110
|
-
var createBindRejectedDetachedChannel = function (amqpConnection, options) { return function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
111
|
-
var channel;
|
|
112
|
-
return __generator(this, function (_a) {
|
|
113
|
-
switch (_a.label) {
|
|
114
|
-
case 0: return [4 /*yield*/, amqpConnection.channelProvider.getChannel('default', __assign(__assign({}, eventQueue_utils_1.OPTIONS), { prefetchCount: options.prefetchCount || eventQueue_utils_1.OPTIONS.prefetchCount }))];
|
|
115
|
-
case 1:
|
|
116
|
-
channel = _a.sent();
|
|
117
|
-
// currently uses default exchange
|
|
118
|
-
return [2 /*return*/, channel];
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
}); }; };
|
|
122
|
-
function getRejectedDetachedQueueName(consumerType, eventType) {
|
|
123
|
-
return ChannelProvider_1.REJECTED_QUEUE_PREFIX + (0, eventQueue_utils_1.getQueueName)(consumerType, eventType);
|
|
124
|
-
}
|
|
125
|
-
function getRejectedDetachedConsumeOptions(bindOptions, consumerType, eventType, redeliverOptions) {
|
|
126
|
-
var queueName = (0, eventQueue_utils_1.getQueueName)(consumerType, eventType);
|
|
127
|
-
return __assign(__assign({}, (0, eventQueue_utils_1.getConsumeOptionsByBindOptions)(bindOptions)), { deadLetterExchange: '', deadLetterRoutingKey: queueName, messageExpiresMs: redeliverOptions.redeliverDelayMs, queueType: 'classic' });
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Bind one event which were rejected with enqueue=false by bindDetached function (the detached type only).
|
|
131
|
-
*/
|
|
132
|
-
function bindRejectedDetached(amqpConnection_1, eventType_1, consumerType_1, onEvent_1, redeliverOptions_1) {
|
|
133
|
-
return __awaiter(this, arguments, void 0, function (amqpConnection, eventType, consumerType, onEvent, redeliverOptions, bindOptions) {
|
|
134
|
-
var queueName;
|
|
135
|
-
if (bindOptions === void 0) { bindOptions = {}; }
|
|
136
|
-
return __generator(this, function (_a) {
|
|
137
|
-
switch (_a.label) {
|
|
138
|
-
case 0:
|
|
139
|
-
queueName = getRejectedDetachedQueueName(consumerType, eventType);
|
|
140
|
-
return [4 /*yield*/, amqpConnection.queueSubscriber.subscribeRepeatable(createBindRejectedDetachedChannel(amqpConnection, bindOptions), queueName, [
|
|
141
|
-
{ exchangeName: '', routingKey: queueName, persistent: true }, // this is default binding defined by AMQP protocol
|
|
142
|
-
], onEvent, getRejectedDetachedConsumeOptions(bindOptions, consumerType, eventType, redeliverOptions))];
|
|
143
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Fetch on event which were rejected with enqueue=false by bindDetached function (the detached type only).
|
|
150
|
-
* Returns message containing event which has to by explicitly acked/nacked.
|
|
151
|
-
*/
|
|
152
|
-
function fetchRejectedDetached(amqpConnection, eventType, consumerType) {
|
|
153
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
154
|
-
var queueName, connection, channel, finish, message, event;
|
|
155
|
-
var _this = this;
|
|
156
|
-
return __generator(this, function (_a) {
|
|
157
|
-
switch (_a.label) {
|
|
158
|
-
case 0:
|
|
159
|
-
queueName = getRejectedDetachedQueueName(consumerType, eventType);
|
|
160
|
-
return [4 /*yield*/, amqpConnection.pool.acquire()];
|
|
161
|
-
case 1:
|
|
162
|
-
connection = _a.sent();
|
|
163
|
-
return [4 /*yield*/, connection.createConfirmChannel()];
|
|
164
|
-
case 2:
|
|
165
|
-
channel = _a.sent();
|
|
166
|
-
finish = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
167
|
-
var error_1;
|
|
168
|
-
return __generator(this, function (_a) {
|
|
169
|
-
switch (_a.label) {
|
|
170
|
-
case 0:
|
|
171
|
-
_a.trys.push([0, 3, , 5]);
|
|
172
|
-
return [4 /*yield*/, channel.close()];
|
|
173
|
-
case 1:
|
|
174
|
-
_a.sent();
|
|
175
|
-
return [4 /*yield*/, amqpConnection.pool.release(connection)];
|
|
176
|
-
case 2:
|
|
177
|
-
_a.sent();
|
|
178
|
-
return [3 /*break*/, 5];
|
|
179
|
-
case 3:
|
|
180
|
-
error_1 = _a.sent();
|
|
181
|
-
return [4 /*yield*/, amqpConnection.pool.destroy(connection)];
|
|
182
|
-
case 4:
|
|
183
|
-
_a.sent();
|
|
184
|
-
throw error_1;
|
|
185
|
-
case 5: return [2 /*return*/];
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
}); };
|
|
189
|
-
return [4 /*yield*/, channel.get(queueName)];
|
|
190
|
-
case 3:
|
|
191
|
-
message = _a.sent();
|
|
192
|
-
if (!!message) return [3 /*break*/, 5];
|
|
193
|
-
return [4 /*yield*/, finish()];
|
|
194
|
-
case 4:
|
|
195
|
-
_a.sent();
|
|
196
|
-
return [2 /*return*/, null];
|
|
197
|
-
case 5:
|
|
198
|
-
event = amqpConnection.channelProvider.decodeMessageBuffer(message.content);
|
|
199
|
-
return [2 /*return*/, {
|
|
200
|
-
event: event,
|
|
201
|
-
ack: function () {
|
|
202
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
203
|
-
return __generator(this, function (_a) {
|
|
204
|
-
switch (_a.label) {
|
|
205
|
-
case 0:
|
|
206
|
-
channel.ack(message);
|
|
207
|
-
return [4 /*yield*/, finish()];
|
|
208
|
-
case 1:
|
|
209
|
-
_a.sent();
|
|
210
|
-
return [2 /*return*/];
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
});
|
|
214
|
-
},
|
|
215
|
-
nack: function (nackOptions) {
|
|
216
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
217
|
-
return __generator(this, function (_a) {
|
|
218
|
-
switch (_a.label) {
|
|
219
|
-
case 0:
|
|
220
|
-
channel.nack(message, undefined, nackOptions === null || nackOptions === void 0 ? void 0 : nackOptions.requeue);
|
|
221
|
-
return [4 /*yield*/, finish()];
|
|
222
|
-
case 1:
|
|
223
|
-
_a.sent();
|
|
224
|
-
return [2 /*return*/];
|
|
225
|
-
}
|
|
226
|
-
});
|
|
227
|
-
});
|
|
228
|
-
},
|
|
229
|
-
}];
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* Fetches events from a detached queue in batches without automatic acknowledgment.
|
|
236
|
-
* Each returned message must be explicitly acknowledged or negative acknowledged.
|
|
237
|
-
*/
|
|
238
|
-
function fetchDetached(amqpConnection_1, eventType_1, consumerType_1) {
|
|
239
|
-
return __awaiter(this, arguments, void 0, function (amqpConnection, eventType, consumerType, options, maxMessages) {
|
|
240
|
-
var queueName, gotMessages;
|
|
241
|
-
if (options === void 0) { options = {}; }
|
|
242
|
-
if (maxMessages === void 0) { maxMessages = 1; }
|
|
243
|
-
return __generator(this, function (_a) {
|
|
244
|
-
switch (_a.label) {
|
|
245
|
-
case 0:
|
|
246
|
-
queueName = (0, eventQueue_utils_1.getQueueName)(consumerType, eventType);
|
|
247
|
-
return [4 /*yield*/, amqpConnection.queueFetcher.fetchBatch(createBindDetachedBatchChannel(amqpConnection, eventType, (0, eventQueue_utils_1.getExchangeName)(options, eventType)), queueName, maxMessages)];
|
|
248
|
-
case 1:
|
|
249
|
-
gotMessages = _a.sent();
|
|
250
|
-
return [2 /*return*/, gotMessages.map(convertAsyncGotMessageToEventDetachedMessage)];
|
|
251
|
-
}
|
|
252
|
-
});
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* Binds to an event queue in detached mode, processing events one by one.
|
|
257
|
-
* Events are automatically acknowledged upon successful processing.
|
|
258
|
-
*/
|
|
259
|
-
function bindDetached(amqpConnection_1, eventType_1, consumerType_1, onEvent_1) {
|
|
260
|
-
return __awaiter(this, arguments, void 0, function (amqpConnection, eventType, consumerType, onEvent, options) {
|
|
261
|
-
var exchangeName, queueName;
|
|
262
|
-
if (options === void 0) { options = {}; }
|
|
263
|
-
return __generator(this, function (_a) {
|
|
264
|
-
switch (_a.label) {
|
|
265
|
-
case 0:
|
|
266
|
-
exchangeName = (0, eventQueue_utils_1.getExchangeName)(options, eventType);
|
|
267
|
-
queueName = (0, eventQueue_utils_1.getQueueName)(consumerType, eventType);
|
|
268
|
-
return [4 /*yield*/, amqpConnection.queueSubscriber.subscribeRepeatable(createBindDetachedChannel(amqpConnection, eventType, exchangeName, options), queueName, [{ exchangeName: exchangeName, routingKey: (0, eventQueue_utils_1.getBasicEventRoutingKey)(eventType), persistent: true }], onEvent, (0, eventQueue_utils_1.getConsumeOptionsByBindOptions)(options))];
|
|
269
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* Binds to an event queue in detached batch mode, processing multiple events together.
|
|
276
|
-
* Fetches additional events up to prefetch count and processes them as a batch.
|
|
277
|
-
* All events in the batch are acknowledged or nacked together.
|
|
278
|
-
*/
|
|
279
|
-
function bindDetachedBatch(amqpConnection_1, eventType_1, consumerType_1, onEvents_1) {
|
|
280
|
-
return __awaiter(this, arguments, void 0, function (amqpConnection, eventType, consumerType, onEvents, options) {
|
|
281
|
-
var exchangeName, queueName, prefetchCount;
|
|
282
|
-
var _this = this;
|
|
283
|
-
var _a;
|
|
284
|
-
if (options === void 0) { options = {}; }
|
|
285
|
-
return __generator(this, function (_b) {
|
|
286
|
-
switch (_b.label) {
|
|
287
|
-
case 0:
|
|
288
|
-
exchangeName = (0, eventQueue_utils_1.getExchangeName)(options, eventType);
|
|
289
|
-
queueName = (0, eventQueue_utils_1.getQueueName)(consumerType, eventType);
|
|
290
|
-
prefetchCount = (_a = options.prefetchCount) !== null && _a !== void 0 ? _a : 1;
|
|
291
|
-
options = __assign(__assign({}, options), { prefetchCount: 1 }); // we always fetch one message at once, the rest is fetched manually
|
|
292
|
-
return [4 /*yield*/, amqpConnection.queueSubscriber.subscribeExpectingConfirmationRepeatable(createBindDetachedBatchChannel(amqpConnection, eventType, exchangeName), queueName, [{ exchangeName: exchangeName, routingKey: (0, eventQueue_utils_1.getBasicEventRoutingKey)(eventType), persistent: true }], function (firstEvent, _headers, ack, nack) { return __awaiter(_this, void 0, void 0, function () {
|
|
293
|
-
var remainingEvents, allEvents, error_2, requeue_1;
|
|
294
|
-
return __generator(this, function (_a) {
|
|
295
|
-
switch (_a.label) {
|
|
296
|
-
case 0: return [4 /*yield*/, fetchDetached(amqpConnection, eventType, consumerType, options, prefetchCount - 1)];
|
|
297
|
-
case 1:
|
|
298
|
-
remainingEvents = _a.sent();
|
|
299
|
-
allEvents = __spreadArray([firstEvent], remainingEvents.map(function (msg) { return msg.event; }), true);
|
|
300
|
-
_a.label = 2;
|
|
301
|
-
case 2:
|
|
302
|
-
_a.trys.push([2, 5, , 7]);
|
|
303
|
-
return [4 /*yield*/, onEvents(allEvents)];
|
|
304
|
-
case 3:
|
|
305
|
-
_a.sent();
|
|
306
|
-
ack();
|
|
307
|
-
return [4 /*yield*/, Promise.all(remainingEvents.map(function (msg) { return msg.ack(); }))];
|
|
308
|
-
case 4:
|
|
309
|
-
_a.sent();
|
|
310
|
-
return [3 /*break*/, 7];
|
|
311
|
-
case 5:
|
|
312
|
-
error_2 = _a.sent();
|
|
313
|
-
requeue_1 = !options.deadLetterIfErred;
|
|
314
|
-
nack({ requeue: requeue_1 });
|
|
315
|
-
return [4 /*yield*/, Promise.all(remainingEvents.map(function (msg) { return msg.nack({ requeue: requeue_1 }); }))];
|
|
316
|
-
case 6:
|
|
317
|
-
_a.sent(); // all messages are nacked
|
|
318
|
-
return [3 /*break*/, 7];
|
|
319
|
-
case 7: return [2 /*return*/];
|
|
320
|
-
}
|
|
321
|
-
});
|
|
322
|
-
}); }, (0, eventQueue_utils_1.getConsumeOptionsByBindOptions)(options))];
|
|
323
|
-
case 1: // we always fetch one message at once, the rest is fetched manually
|
|
324
|
-
return [2 /*return*/, _b.sent()];
|
|
325
|
-
}
|
|
326
|
-
});
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
|
-
/**
|
|
330
|
-
* Binds to an event queue in detached mode with manual acknowledgment control.
|
|
331
|
-
* The event handler receives explicit ack and nack functions for fine-grained control.
|
|
332
|
-
*/
|
|
333
|
-
function bindDetachedExpectingConfirmation(amqpConnection_1, eventType_1, consumerType_1, onEvent_1) {
|
|
334
|
-
return __awaiter(this, arguments, void 0, function (amqpConnection, eventType, consumerType, onEvent, options) {
|
|
335
|
-
var exchangeName, queueName;
|
|
336
|
-
var _this = this;
|
|
337
|
-
if (options === void 0) { options = {}; }
|
|
338
|
-
return __generator(this, function (_a) {
|
|
339
|
-
switch (_a.label) {
|
|
340
|
-
case 0:
|
|
341
|
-
exchangeName = (0, eventQueue_utils_1.getExchangeName)(options, eventType);
|
|
342
|
-
queueName = (0, eventQueue_utils_1.getQueueName)(consumerType, eventType);
|
|
343
|
-
return [4 /*yield*/, amqpConnection.queueSubscriber.subscribeExpectingConfirmationRepeatable(createBindDetachedChannel(amqpConnection, eventType, exchangeName, options), queueName, [{ exchangeName: exchangeName, routingKey: (0, eventQueue_utils_1.getBasicEventRoutingKey)(eventType), persistent: true }], function (event, _headers, ack, nack) { return __awaiter(_this, void 0, void 0, function () {
|
|
344
|
-
var ackAsync;
|
|
345
|
-
var _this = this;
|
|
346
|
-
return __generator(this, function (_a) {
|
|
347
|
-
switch (_a.label) {
|
|
348
|
-
case 0:
|
|
349
|
-
ackAsync = function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
350
|
-
return [2 /*return*/, ack()];
|
|
351
|
-
}); }); };
|
|
352
|
-
return [4 /*yield*/, onEvent(event, ackAsync, nack)];
|
|
353
|
-
case 1:
|
|
354
|
-
_a.sent();
|
|
355
|
-
return [2 /*return*/];
|
|
356
|
-
}
|
|
357
|
-
});
|
|
358
|
-
}); }, (0, eventQueue_utils_1.getConsumeOptionsByBindOptions)(options))];
|
|
359
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
360
|
-
}
|
|
361
|
-
});
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
/**
|
|
365
|
-
* Prepares event queues and exchanges for detached event processing without starting consumption.
|
|
366
|
-
* Useful for initializing infrastructure before actual event processing begins.
|
|
367
|
-
*/
|
|
368
|
-
function prepareDetached(amqpConnection_1, eventTypes_1, consumerType_1) {
|
|
369
|
-
return __awaiter(this, arguments, void 0, function (amqpConnection, eventTypes, consumerType, options) {
|
|
370
|
-
var _i, eventTypes_2, eventType, cancel, close_1;
|
|
371
|
-
var _this = this;
|
|
372
|
-
if (options === void 0) { options = {}; }
|
|
373
|
-
return __generator(this, function (_a) {
|
|
374
|
-
switch (_a.label) {
|
|
375
|
-
case 0:
|
|
376
|
-
_i = 0, eventTypes_2 = eventTypes;
|
|
377
|
-
_a.label = 1;
|
|
378
|
-
case 1:
|
|
379
|
-
if (!(_i < eventTypes_2.length)) return [3 /*break*/, 6];
|
|
380
|
-
eventType = eventTypes_2[_i];
|
|
381
|
-
return [4 /*yield*/, bindDetached(amqpConnection, eventType, consumerType, function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
382
|
-
return [2 /*return*/, new Promise(function () { return undefined; })];
|
|
383
|
-
}); }); }, options)];
|
|
384
|
-
case 2:
|
|
385
|
-
cancel = _a.sent();
|
|
386
|
-
return [4 /*yield*/, cancel()];
|
|
387
|
-
case 3:
|
|
388
|
-
close_1 = _a.sent();
|
|
389
|
-
return [4 /*yield*/, close_1()];
|
|
390
|
-
case 4:
|
|
391
|
-
_a.sent();
|
|
392
|
-
_a.label = 5;
|
|
393
|
-
case 5:
|
|
394
|
-
_i++;
|
|
395
|
-
return [3 /*break*/, 1];
|
|
396
|
-
case 6: return [2 /*return*/];
|
|
397
|
-
}
|
|
398
|
-
});
|
|
399
|
-
});
|
|
400
|
-
}
|
|
401
17
|
/**
|
|
402
|
-
*
|
|
403
|
-
* Sets up the queue for handling previously rejected events that need reprocessing.
|
|
18
|
+
* @deprecated Use `@signageos/amqp` instead.
|
|
404
19
|
*/
|
|
405
|
-
|
|
406
|
-
return __awaiter(this, arguments, void 0, function (amqpConnection, eventType, consumerType, redeliverOptions, bindOptions) {
|
|
407
|
-
var cancel, close;
|
|
408
|
-
var _this = this;
|
|
409
|
-
if (bindOptions === void 0) { bindOptions = {}; }
|
|
410
|
-
return __generator(this, function (_a) {
|
|
411
|
-
switch (_a.label) {
|
|
412
|
-
case 0: return [4 /*yield*/, bindRejectedDetached(amqpConnection, eventType, consumerType, function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
413
|
-
return [2 /*return*/, new Promise(function () { return undefined; })];
|
|
414
|
-
}); }); }, redeliverOptions, bindOptions)];
|
|
415
|
-
case 1:
|
|
416
|
-
cancel = _a.sent();
|
|
417
|
-
return [4 /*yield*/, cancel()];
|
|
418
|
-
case 2:
|
|
419
|
-
close = _a.sent();
|
|
420
|
-
return [4 /*yield*/, close()];
|
|
421
|
-
case 3:
|
|
422
|
-
_a.sent();
|
|
423
|
-
return [2 /*return*/];
|
|
424
|
-
}
|
|
425
|
-
});
|
|
426
|
-
});
|
|
427
|
-
}
|
|
20
|
+
__exportStar(require("@signageos/amqp/dist/EventSourcing/eventQueueDetached"), exports);
|
|
428
21
|
//# sourceMappingURL=eventQueueDetached.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventQueueDetached.js","sourceRoot":"","sources":["../../../src/AMQP/EventSourcing/eventQueueDetached.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"eventQueueDetached.js","sourceRoot":"","sources":["../../../src/AMQP/EventSourcing/eventQueueDetached.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,wFAAsE"}
|
|
@@ -1,55 +1,4 @@
|
|
|
1
|
-
import { IAMQPConnection } from '../amqpConnectionFactory';
|
|
2
|
-
import INackOptions from '../INackOptions';
|
|
3
|
-
import IEvent, { IEventPayload } from './IEvent';
|
|
4
|
-
import IConsumeOptions from '../IConsumeOptions';
|
|
5
|
-
import IMessageOptions from '../IMessageOptions';
|
|
6
|
-
import { IBindOptions, IRejectedRedeliverOptions } from './eventQueue.utils';
|
|
7
|
-
export interface IEventDomainMessage<TPayload extends IEventPayload> {
|
|
8
|
-
event: IEvent<TPayload>;
|
|
9
|
-
domain: string;
|
|
10
|
-
ack(): Promise<void>;
|
|
11
|
-
nack(nackOptions?: INackOptions): Promise<void>;
|
|
12
|
-
}
|
|
13
|
-
export type RPCDomainResponseFailed = {
|
|
14
|
-
status: 'error';
|
|
15
|
-
error: string;
|
|
16
|
-
};
|
|
17
|
-
export type RPCDomainResponseSucceeded = {
|
|
18
|
-
status: 'success';
|
|
19
|
-
};
|
|
20
|
-
export type RPCDomainResponse = RPCDomainResponseFailed | RPCDomainResponseSucceeded;
|
|
21
1
|
/**
|
|
22
|
-
*
|
|
2
|
+
* @deprecated Use `@signageos/amqp` instead.
|
|
23
3
|
*/
|
|
24
|
-
export
|
|
25
|
-
export declare function processRPCDomain(amqpConnection: IAMQPConnection, domainName: string, consumerType: string, event: IEvent<IEventPayload>, messageOptions?: IMessageOptions, headers?: Record<string, string>): Promise<void>;
|
|
26
|
-
export declare function processRPCDomainBatch(amqpConnection: IAMQPConnection, domainName: string, consumerType: string, events: IEvent<IEventPayload>[], messageOptions?: IMessageOptions, headers?: Record<string, string>): Promise<void>;
|
|
27
|
-
export declare function bindRPCDomain<TPayload extends IEventPayload>(amqpConnection: IAMQPConnection, domainName: string, consumerType: string, onEvent: (event: IEvent<TPayload>, headers: object) => Promise<void>, options?: IBindOptions): Promise<import("../QueueSubscriber").ICancelConsumption>;
|
|
28
|
-
export declare function bindRPCDomainBatch<TPayload extends IEventPayload>(amqpConnection: IAMQPConnection, domainName: string, consumerType: string, onEvents: (events: IEvent<TPayload>[]) => Promise<void>, options?: IBindOptions): Promise<import("../QueueSubscriber").ICancelConsumption>;
|
|
29
|
-
export declare function fetchDomain<TPayload extends IEventPayload>(amqpConnection: IAMQPConnection, domainName: string, consumerType: string, options?: IBindOptions, maxMessages?: number, breakCondition?: (nextEvent: IEvent<TPayload>) => boolean): Promise<IEventDomainMessage<TPayload>[]>;
|
|
30
|
-
/**
|
|
31
|
-
* Bind more event types into one single queue.
|
|
32
|
-
* This queue name contains specified domainName and is prefixed by consumerType.
|
|
33
|
-
*/
|
|
34
|
-
export declare function bindDomain<TPayload extends IEventPayload>(amqpConnection: IAMQPConnection, eventTypes: string[], domainName: string, consumerType: string, onEvent: (event: IEvent<TPayload>, headers: object) => Promise<void>, options?: IBindOptions): Promise<import("../QueueSubscriber").ICancelConsumption>;
|
|
35
|
-
/**
|
|
36
|
-
* Bind more event types into one single queue and consume them in batches.
|
|
37
|
-
* This queue name contains specified domainName and is prefixed by consumerType.
|
|
38
|
-
* One batch contains up to prefetchCount events and currently it has to be all of the same type.
|
|
39
|
-
* All events in the batch are in the same order as they were in the queue.
|
|
40
|
-
*/
|
|
41
|
-
export declare function bindDomainBatch<TPayload extends IEventPayload>(amqpConnection: IAMQPConnection, eventTypes: string[], domainName: string, consumerType: string, onEvents: (events: IEvent<TPayload>[]) => Promise<void>, options?: IBindOptions, batchOptions?: {
|
|
42
|
-
/** Maximum time to wait before flushing the batch even if maxBatchSize is not reached */
|
|
43
|
-
flushBatchDelayMs?: number;
|
|
44
|
-
}): Promise<() => Promise<import("../QueueSubscriber").ICloseChannel>>;
|
|
45
|
-
/**
|
|
46
|
-
* Bind all events which were rejected with enqueue=false by bindMany function (the domain type only).
|
|
47
|
-
*/
|
|
48
|
-
export declare function bindRejectedDomain(amqpConnection: IAMQPConnection, domainName: string, consumerType: string, onEvent: (event: IEvent<IEventPayload>) => Promise<void>, redeliverOptions: IRejectedRedeliverOptions, options?: IBindOptions): Promise<import("../QueueSubscriber").ICancelConsumption>;
|
|
49
|
-
/**
|
|
50
|
-
* Fetch on event which were rejected with enqueue=false by bindMany function (the domain type only).
|
|
51
|
-
* Returns message containing event which has to by explicitly acked/nacked.
|
|
52
|
-
*/
|
|
53
|
-
export declare function fetchRejectedDomain(amqpConnection: IAMQPConnection, domainName: string, consumerType: string): Promise<IEventDomainMessage<IEventPayload> | null>;
|
|
54
|
-
export declare function prepareDomain(amqpConnection: IAMQPConnection, eventTypes: string[], domainName: string, consumerType: string, options?: IBindOptions): Promise<void>;
|
|
55
|
-
export declare function prepareRejectedDomain(amqpConnection: IAMQPConnection, domainName: string, consumerType: string, redeliverOptions: IRejectedRedeliverOptions, options?: IBindOptions): Promise<void>;
|
|
4
|
+
export * from '@signageos/amqp/dist/EventSourcing/eventQueueDomain';
|