Sha256: bba8dab91a892ecc22dd50ddea903de96e15bd72c5407db5e3000068b73b7b87
Contents?: true
Size: 704 Bytes
Versions: 1
Compression:
Stored size: 704 Bytes
Contents
## Intro aliyun-mns 阿里云消息队列 #### Usage ``` gem "aliyun-mns" AliyunMns.setup do |config| config.access_key = 'abc...' config.secret_key = 'w5....' config.api_version = "2015-06-06" config.endpoint = "14589xxxxx.mns.cn-shanghai.aliyuncs.com" config.protocol = "http" end msg = '{"id": 123, "text": "eee"}' p ["Send", AliyunMns.send_msg("item-dwg-upgrade", Base64.encode64(msg))] msg = AliyunMns.receive("item-dwg-upgrade") receipt_handle = msg["Message"]["ReceiptHandle"] body = Base64.decode64(msg["Message"]["MessageBody"]) rescue nil p ["receive", "body", body, "receipt_handle", receipt_handle ] p ["delete", AliyunMns.delete("item-dwg-upgrade", receipt_handle)] ```
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
aliyun_mns_queue-0.0.1 | README.md |