@rocketmq/amqp 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/README.md +29 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # @rocketmq/amqp
2
+
3
+ Low-level AMQP 0-9-1 wrapper for RocketMQ.
4
+
5
+ This package provides the underlying connection and channel abstractions (`AmqpConnection`, `AmqpChannel`) used by the `@rocketmq/core` SDK. It wraps `amqplib` to provide a robust, Promise-based API tailored for RocketMQ's schema-aware messaging extensions.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install @rocketmq/amqp
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ You generally do not need to use this package directly unless you are building custom broker integrations. Use `@rocketmq/core` instead.
16
+
17
+ ```typescript
18
+ import { AmqpConnection } from '@rocketmq/amqp';
19
+
20
+ const conn = await AmqpConnection.connect('amqp://localhost');
21
+ const ch = await conn.createChannel();
22
+
23
+ await ch.assertQueue('my-queue');
24
+ ch.sendToQueue('my-queue', Buffer.from('hello'), { persistent: true });
25
+ ```
26
+
27
+ ## License
28
+
29
+ Apache 2.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rocketmq/amqp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {