nsqjs-extra

0.1.0 • Public • Published

nsqjs-extra

Extra NodeJS client for the nsq client protocol, supporting async/await function.

npm version license

About

nsqjs-extra

Extra NodeJS client for the nsq client protocol. Adding:

  • reader.connectSync
  • reader.closeSync
  • writer.connectSync
  • writer.publishSync
  • writer.deferPublishSync
  • writer.closeSync

Install

npm add nsqjs-extra

Usage

const { Reader, Writer } = require('nsqjs-extra')

const reader = new Reader('topic', 'default', { nsqdTCPAddresses: ['127.0.0.1:4150'] })
await reader.connectSync()
// do something
await reader.closeSync()

const writer = new Writer('127.0.0.1', '4150')
await writer.connectSync()
await writer.publishSync('topic', 'message')
await writer.deferPublishSync('topic', ['message'], 1000)
await writer.closeSync()

Contributing

Please consult CONTRIBUTING for guidelines on contributing to this project.

Author

nsqjs-extra © Hoang Dinh, Released under the MIT License.

/nsqjs-extra/

    Package Sidebar

    Install

    npm i nsqjs-extra

    Weekly Downloads

    5

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    18.1 kB

    Total Files

    14

    Last publish

    Collaborators

    • kydrenw