{"_id":"@aliengencorp/ali-ons","_rev":"1-3b806a967d8740f97f5db58cec70d067","name":"@aliengencorp/ali-ons","dist-tags":{"latest":"3.7.1"},"versions":{"3.7.1":{"name":"@aliengencorp/ali-ons","version":"3.7.1","description":"Aliyun Open Notification Service Client","main":"lib/index.js","scripts":{"autod":"autod","pkgfiles":"egg-bin pkgfiles --check","lint":"eslint . --ext .js","test":"npm run lint && npm run test-local","test-local":"TEST_TIMEOUT=120000 egg-bin test","cov":"TEST_TIMEOUT=120000 egg-bin cov","ci":"npm run autod -- --check && npm run pkgfiles && npm run lint && npm run cov","contributors":"contributors -f plain -o AUTHORS"},"repository":{"type":"git","url":"git+https://github.com/ali-sdk/ali-ons.git"},"keywords":["ons","aliyun","ali-sdk"],"author":{"name":"gxcsoccer","email":"gxcsoccer@126.com"},"license":"MIT","bugs":{"url":"https://github.com/ali-sdk/ali-ons/issues"},"homepage":"https://github.com/ali-sdk/ali-ons#readme","dependencies":{"JSON2":"^0.1.0","address":"^1.1.0","binary-search-insert":"^1.0.3","byte":"^2.0.0","bytes":"^3.1.0","debug":"^4.1.1","is-type-of":"^1.2.1","long":"^4.0.0","mkdirp":"^0.5.1","mz-modules":"^2.1.0","osenv":"^0.1.5","p-gather":"^1.0.2","sdk-base":"^3.6.0","tcp-base":"^3.1.0","utility":"^1.16.1"},"devDependencies":{"autod":"^3.1.0","contributors":"^0.5.1","egg-bin":"^4.13.0","eslint":"^5.16.0","eslint-config-egg":"^7.4.1","mm":"^2.5.0","urllib":"^2.34.0"},"engines":{"node":">= 8.0.0"},"contributors":[{"name":"GaoXiaochen","email":"gxcsoccer@users.noreply.github.com"},{"name":"宗羽","email":"xiaochen.gaoxc@alibaba-inc.com"}],"gitHead":"8af36db949c72be9d51e1ce831716375af80276f","_id":"@aliengencorp/ali-ons@3.7.1","_nodeVersion":"13.3.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-brCsA2Dye4/Dwrmg9TZlQLSib9eT461ju6HAq3ixPxSf3nr/dq7m7LystAPzcK7/OzjAGT556DmAC1wJZqSHFA==","shasum":"0f73d4d5aed9429959030b24f0a3a69c30d4ec32","tarball":"https://registry.npmjs.org/@aliengencorp/ali-ons/-/ali-ons-3.7.1.tgz","fileCount":40,"unpackedSize":154701,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/K4cCRA9TVsSAnZWagAAz3cQAJl/0pVv0T2RBD9jCGqQ\nhTAvA/aEY067faANh0Tbn2VqZ1SMi7TbtIA46YkFMqdhNcKJXYsokDS6sZD0\nXgDa3zuYequSt0g91yJfEFt0C+OSeSRVnwb6dHEyemPGsArPyGNpWxTKqoPh\no25G+F2PE2RfTjiy6cAarR0deACL1FJDIu1HQEPFEfPBf1PUnSap19Lev10r\nqsuFS2aJbIclbWr/ZAW1uZsQU+kw5JkwmXiDBagOZpTBgfEaUNli8TLYEN66\nzVzW7V5Myasy/CGQYWocE1LKVmJRaZKVT1qGAN8O8r3jAXX+BGWg4EHaAfAv\n2uox0v7KrOJrAEhYTSkGXtVOnKSKbn2/ossYzfXLo/k0jO7fMNKJW08Rn0Xm\nuE1tU5DQs3LTR4Qq2vH/mzA3SSSbDZc5/A+JjPCCceYZzqLL74wJ6eWoU0F6\niTnRbdraJvftbGlaFOKPnfhvI+H6n1cgaq6jrdQ7tLdjyaqzbRx0sE7L1WZj\n9JRqRdeb7P/BPhqq2tF22vmZ7TakW7jui8BZv57ZYPxZu4w4qEWMLqOp2juG\n5P237B8ZBf+k4N59u7eCW8O1yiueufpMfDToPzD+OSe8ZzO+fJuBzWwv4Ej2\n4uAeG8feve7AMCOdPErT5X2bmUi7J2tuBpykrhRgk5FJoECfzbeCDkRQI095\nrrBc\r\n=HUW3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHh1Kmqqk2pY2bQ+ztduwVB5ApKBPfLQXPXlyU60fAtJAiEAoisDDr86+FwzeVQSBzQK9Aim7t8DeRX2J/ZAZ91LUrg="}]},"maintainers":[{"name":"ortonomy","email":"ortonomy.dev@gmail.com"}],"_npmUser":{"name":"ortonomy","email":"ortonomy.dev@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ali-ons_3.7.1_1576840731680_0.4217045344022998"},"_hasShrinkwrap":false}},"time":{"created":"2019-12-20T11:18:51.421Z","3.7.1":"2019-12-20T11:18:51.826Z","modified":"2022-04-04T12:59:35.181Z"},"maintainers":[{"name":"ortonomy","email":"ortonomy.dev@gmail.com"}],"description":"Aliyun Open Notification Service Client","homepage":"https://github.com/ali-sdk/ali-ons#readme","keywords":["ons","aliyun","ali-sdk"],"repository":{"type":"git","url":"git+https://github.com/ali-sdk/ali-ons.git"},"contributors":[{"name":"GaoXiaochen","email":"gxcsoccer@users.noreply.github.com"},{"name":"宗羽","email":"xiaochen.gaoxc@alibaba-inc.com"}],"author":{"name":"gxcsoccer","email":"gxcsoccer@126.com"},"bugs":{"url":"https://github.com/ali-sdk/ali-ons/issues"},"license":"MIT","readme":"Forked from original package to provide ``__SHARDINGKEY`` system prop support.\n\nali-ons\n=======\n\n[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![David deps][david-image]][david-url]\n\n[npm-image]: https://img.shields.io/npm/v/ali-ons.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/ali-ons\n[travis-image]: https://img.shields.io/travis/ali-sdk/ali-ons.svg?style=flat-square\n[travis-url]: https://travis-ci.org/ali-sdk/ali-ons\n[david-image]: https://img.shields.io/david/ali-sdk/ali-ons.svg?style=flat-square\n[david-url]: https://david-dm.org/ali-sdk/ali-ons\n\nAliyun Open Notification Service Client (base on opensource project [RocketMQ](https://rocketmq.apache.org/))\n\nSub module of [ali-sdk](https://github.com/ali-sdk/ali-sdk).\n\n## Install\n\n```bash\nnpm install ali-ons --save\n```\n\n## Usage\n\nconsumer\n\n```js\n'use strict';\n\nconst httpclient = require('urllib');\nconst Consumer = require('ali-ons').Consumer;\nconst consumer = new Consumer({\n  httpclient,\n  accessKeyId: 'your-accessKeyId',\n  accessKeySecret: 'your-AccessKeySecret',\n  consumerGroup: 'your-consumer-group',\n  // namespace: '', // aliyun namespace support\n  // isBroadcast: true,\n});\n\nconsumer.subscribe(config.topic, '*', async msg => {\n  console.log(`receive message, msgId: ${msg.msgId}, body: ${msg.body.toString()}`)\n});\n\nconsumer.on('error', err => console.log(err));\n```\n\nproducer\n\n```js\n'use strict';\nconst httpclient = require('urllib');\nconst Producer = require('ali-ons').Producer;\nconst Message = require('ali-ons').Message;\n\nconst producer = new Producer({\n  httpclient,\n  accessKeyId: 'your-accessKeyId',\n  accessKeySecret: 'your-AccessKeySecret',\n  producerGroup: 'your-producer-group',\n  // namespace: '', // aliyun namespace support\n});\n\n(async () => {\n  const msg = new Message('your-topic', // topic\n    'TagA', // tag\n    'Hello ONS !!! ' // body\n  );\n\n  // set Message#keys\n  msg.keys = ['key1'];\n\n  // delay consume\n  // msg.setStartDeliverTime(Date.now() + 5000);\n\n  const sendResult = await producer.send(msg);\n  console.log(sendResult);\n})().catch(err => console.error(err))\n```\n\n## Secure Keys\n\nPlease contact to @gxcsoccer to give you accessKey\n\n- [ons secure data](https://sharelock.io/1/UM02CJiYyhXiZDOn1nhX0iqPqMIQtdwI_T5BY3F-tHs.d8-ycA/01veKH9kgAuFuKCqlVPzGsyPWJ8mQLaKPJjjcB9tpdbvi9L6XQ/IgqDvAdVDMzV9lK2gQzyAj7q-CNk8-1tWrLmdqMV0oJ5qgky40/HgpZyKKDfOGAcyqQ20RUdRgCLRWqF8LUUko0uDl_L-ATNOsi5z/W2bsvBc8tAoqSwNR7u2Sqe6XkNmD98s3UQOK-6T8--VwTbHzcG/dwkHwie3EkGB-TbiMnbRh7_5A-DaOTCtALP3xvl4G0XKxuOriC/2yfuPp7WRucTAoqx2STO5Hv3MZEhh3IXf7YiOQ8pWDDqjLuQSY/_irqzYyeseY9m106ksMUq3-yS_qkBRIuoyL-hHk9ZRhGppsdA5/Dw4Pjg.fmNP3aFkLnvPuhlPRwNcng)\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.md"}