A self-packaged Apache RocketMQ Node.js client implemented via RocketMQ 5.x gRPC protocol. Version 0.3.1 is current. It is a pure Node.js client with no dependencies on egg.js or other third-party libraries. Provides distributed ordering, a custom PushConsumer-like pattern using long polling, and unified logging. Requires Node.js >= 16.19.0 (recommended >= 18.17.0). Differentiators: lightweight, TypeScript-native, supports multiple message types (NORMAL, FIFO, DELAY, TRANSACTION) and consumption modes (PRODUCER, SIMPLE_CONSUMER, PUSH_CONSUMER). Actively maintained on GitHub.
npm install rocketmq-grpcNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates sending a normal message with Producer and receiving messages with SimpleConsumer using long polling.
Run sudo npm run build or configure npm to avoid permission issues.
Run command prompt as administrator then execute npm run build.
Deploy RocketMQ proxy (https://github.com/apache/rocketmq/tree/develop/proxy) and configure endpoints accordingly.
Check message length and call receive again after a delay, or use the custom PushConsumer approach if available.
Ensure RocketMQ proxy is running and endpoints matches the host:port of the proxy (default 8081).
Run npm install @grpc/grpc-js in your project.
Use import { SimpleConsumer } from 'rocketmq-grpc'.