{"repo":"XadillaX/aliyun-ons","free":true,"listed":false,"github":"https://github.com/XadillaX/aliyun-ons","clone":"git clone https://github.com/XadillaX/aliyun-ons.git","description":":cloud: SDK of Node.js for Aliyun ONS. :rocket:","language":"C++","stars":157,"topics":["aliyun","sdk","ons","nodejs","rocketmq"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Aliyun ONS SDK for Node.js SDK of Node.js for Aliyun ONS. ONS (Open Notification Service) is a message queue service of aliyun based on MetaQ (RocketMQ). Maybe you want 中文文档? Installation NOTE: Because of Aliyun ONS C++ SDK's closed source, it only provides Linux and Windows library file (libonsclient4cpp.a, ONSClientCPP.lib). So you can only install this package under Linux and Windows 64x so far. Current 4.x version of ons supports OSX via incomplete HTTP protocol. Not recommended for stable use. Usage You should turn on ONS first and then get an access key and a secret key . In next step you should create a consumer id or a producer id, and a topic. You can do steps above by refering to help desk and aliyun console. Examples Here's some examples for consumer and producer. Consumer You can create a consumer by code following: OPTIONS is optional and any parameters in OPTIONS are optional too. eg. + namesrvAddr: the ONS server address + onsAddr: an address to fetch ONS server address + threadNum: worker thread count + order: true if you want it be OrderConsumer + httpDomain: OSX only, refer to https://help.aliyun.com/document detail/29574.html OSX only supports threadNum and httpDomain options. And TAGS parameter in constructor will be useless under OSX. Next step you should set one or more message receive function to that consumer. After creating a consumer and set listener, you should initialize for it and then listen. That's easy! And what's more, you can stop it when you","default_branch":null,"files":null,"tree":[],"storefront":"/r/XadillaX","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/XadillaX/aliyun-ons/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}