@quatrain/queue-amqp 1.2.22 → 1.2.23
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 +38 -0
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @quatrain/queue-amqp
|
|
2
|
+
|
|
3
|
+
The AMQP (Advanced Message Queuing Protocol) adapter for `@quatrain/queue`.
|
|
4
|
+
|
|
5
|
+
## Introduction
|
|
6
|
+
|
|
7
|
+
This adapter enables communication with AMQP 0-9-1 brokers such as RabbitMQ. It is ideal for high-throughput, low-latency messaging requirements where you have full control over the broker infrastructure.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @quatrain/queue-amqp amqplib
|
|
13
|
+
# or
|
|
14
|
+
yarn add @quatrain/queue-amqp amqplib
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Configuration
|
|
18
|
+
|
|
19
|
+
Register the adapter by providing the connection URL for your AMQP broker.
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { Queue } from '@quatrain/queue'
|
|
23
|
+
import { AmqpQueueAdapter } from '@quatrain/queue-amqp'
|
|
24
|
+
|
|
25
|
+
const amqpAdapter = new AmqpQueueAdapter({
|
|
26
|
+
config: {
|
|
27
|
+
url: 'amqp://user:password@localhost:5672',
|
|
28
|
+
// Optional: specify an exchange if not using default
|
|
29
|
+
exchange: 'quatrain-exchange'
|
|
30
|
+
}
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
Queue.addAdapter('rabbitmq', amqpAdapter, true)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## License
|
|
37
|
+
|
|
38
|
+
AGPL-3.0-only
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quatrain/queue-amqp",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.23",
|
|
4
4
|
"description": "Queue adapter for AMQP compatible queue",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@cloudamqp/amqp-client": "^3.4.1",
|
|
32
|
-
"@quatrain/core": "^1.1.
|
|
33
|
-
"@quatrain/queue": "^1.1.
|
|
32
|
+
"@quatrain/core": "^1.1.49",
|
|
33
|
+
"@quatrain/queue": "^1.1.29",
|
|
34
34
|
"amqplib": "^0.10.9"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|