Sha256: fde307d67662732f83d74cdc6abd40c5c42920cc1f24e6ac09a98ec2765d1e28
Contents?: true
Size: 716 Bytes
Versions: 1
Compression:
Stored size: 716 Bytes
Contents
## Intro aliyun_mns_queue 阿里云消息队列 #### Usage ``` gem "aliyun_mns_queue" 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.2 | README.md |