@omnitron-dev/titan-notifications 0.4.6 → 0.4.8
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 +22 -27
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -1,44 +1,39 @@
|
|
|
1
1
|
# @omnitron-dev/titan-notifications
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Notification delivery with pluggable channels and Redis-backed Rotif messaging.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Capabilities
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- Durable broker publication, consumer groups and dead-letter queues.
|
|
8
|
+
- Configurable notification channels and lifecycle observers.
|
|
9
|
+
- A diagnostics adapter through `./diagnostics` using the same transport and queue.
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
## Quick start
|
|
12
|
+
|
|
13
|
+
```sh
|
|
10
14
|
pnpm add @omnitron-dev/titan-notifications
|
|
11
15
|
```
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
```ts
|
|
18
|
+
import { NotificationsModule } from '@omnitron-dev/titan-notifications';
|
|
19
|
+
|
|
20
|
+
export const notifications = NotificationsModule.forRoot({
|
|
21
|
+
redis: { host: '127.0.0.1', port: 6379 },
|
|
22
|
+
});
|
|
23
|
+
```
|
|
14
24
|
|
|
15
|
-
|
|
25
|
+
Add this dynamic module to the `imports` of an existing Titan application.
|
|
16
26
|
|
|
17
|
-
|
|
27
|
+
Use a dedicated configured Redis service and register consumers for the channels you publish. The `./rotif` entry exposes the messaging layer directly.
|
|
18
28
|
|
|
19
|
-
|
|
20
|
-
`DiagnosticNotificationsModule`, `DiagnosticNotificationSink` and
|
|
21
|
-
`DIAGNOSTIC_NOTIFICATION_SINK`. Pass a configured `NotificationsModule.forRoot`
|
|
22
|
-
or `forRootAsync` module; the adapter uses its transport, queue, deduplication and
|
|
23
|
-
DLQ. No messenger integration or automatic publication is enabled by importing it.
|
|
29
|
+
Delivery rejects if no consumer accepts the event or a matching stream fails to acknowledge publication. Reuse stable event identities when retrying partial fan-out. A broker receipt confirms queue acceptance, not end-user delivery; consumers must make external effects idempotent.
|
|
24
30
|
|
|
25
|
-
|
|
26
|
-
fails to acknowledge publication. A Redis failure or invalid acknowledgement
|
|
27
|
-
never counts as a duplicate. Partial fan-out remains retryable: reuse the event
|
|
28
|
-
identity so confirmed streams deduplicate while failed streams can accept it.
|
|
29
|
-
Transport and error-observer causes are retained with credential redaction.
|
|
30
|
-
A queued receipt confirms broker acceptance, not human receipt; consumers must
|
|
31
|
-
remain idempotent outside the 24-hour deduplication window.
|
|
31
|
+
Importing `./diagnostics` does not enable a messenger or publish events. Pass an explicitly configured notification module to its adapter. Observer failures are reported without resending notifications whose delivery already committed.
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
When upgrading, keys previously changed by underscore substitution start a new
|
|
35
|
-
broker deduplication window. Consumer idempotency must cover retries that cross
|
|
36
|
-
that deployment boundary.
|
|
33
|
+
## Documentation
|
|
37
34
|
|
|
38
|
-
|
|
39
|
-
the next successful invocation of that event. They do not resend a notification
|
|
40
|
-
whose delivery has already committed.
|
|
35
|
+
[Public API](src/index.ts) · [Package exports](package.json) · [Omni](../../README.md)
|
|
41
36
|
|
|
42
37
|
## License
|
|
43
38
|
|
|
44
|
-
MIT
|
|
39
|
+
[MIT](../../LICENSE).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omnitron-dev/titan-notifications",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.8",
|
|
4
4
|
"description": "Notifications module for Titan framework with multi-channel delivery, Rotif messaging, and DLQ",
|
|
5
5
|
"author": "LuxQuant",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,16 +26,16 @@
|
|
|
26
26
|
"lua"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@omnitron-dev/common": "0.4.
|
|
29
|
+
"@omnitron-dev/common": "0.4.8",
|
|
30
30
|
"ioredis": "^6.0.0",
|
|
31
31
|
"minimatch": "^11.0.3",
|
|
32
32
|
"msgpackr": "^2.1.3",
|
|
33
33
|
"reflect-metadata": "^0.2.2"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@omnitron-dev/titan": "0.4.
|
|
37
|
-
"@omnitron-dev/titan-events": "0.4.
|
|
38
|
-
"@omnitron-dev/titan-redis": "0.4.
|
|
36
|
+
"@omnitron-dev/titan": "0.4.8",
|
|
37
|
+
"@omnitron-dev/titan-events": "0.4.8",
|
|
38
|
+
"@omnitron-dev/titan-redis": "0.4.8",
|
|
39
39
|
"amqplib": ">=0.10.0",
|
|
40
40
|
"firebase-admin": ">=12.0.0",
|
|
41
41
|
"nodemailer": ">=6.0.0",
|
|
@@ -56,10 +56,10 @@
|
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@omnitron-dev/eventemitter": "0.4.
|
|
60
|
-
"@omnitron-dev/titan": "0.4.
|
|
61
|
-
"@omnitron-dev/titan-events": "0.4.
|
|
62
|
-
"@omnitron-dev/titan-redis": "0.4.
|
|
59
|
+
"@omnitron-dev/eventemitter": "0.4.8",
|
|
60
|
+
"@omnitron-dev/titan": "0.4.8",
|
|
61
|
+
"@omnitron-dev/titan-events": "0.4.8",
|
|
62
|
+
"@omnitron-dev/titan-redis": "0.4.8",
|
|
63
63
|
"@types/node": "26.6.6",
|
|
64
64
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
65
65
|
"vitest": "^5.0.5",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"url": "git+https://github.com/omnitron-dev/omni.git",
|
|
71
71
|
"directory": "packages/titan-notifications"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "1ae8568eebc2581e2cc2428bd3ca1cf570ed3f03",
|
|
74
74
|
"scripts": {
|
|
75
75
|
"build": "../../scripts/build-package.sh -p ./tsconfig.json",
|
|
76
76
|
"test": "vitest run",
|