All Projects → NETkiddy → cmq-go

NETkiddy / cmq-go

Licence: MIT License
Tencent CMQ Golang SDK

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to cmq-go

cb-spider
CB-Spider provides a unified view and single interface for multi-cloud management.
Stars: ✭ 26 (+30%)
Mutual labels:  tencent
APIJSON-Demo
腾讯 APIJSON 各种语言、各种框架 的 使用示例项目、上手文档、测试数据 SQL 文件 等。Demo projects with document and SQL files for Tencent APIJSON with different programming languages and different frameworks.
Stars: ✭ 230 (+1050%)
Mutual labels:  tencent
tencent-tensorflow-scf
A template project for serverless functions for Tensorflow inference on Tencent Cloud.
Stars: ✭ 38 (+90%)
Mutual labels:  tencent
Tencent Cartoon Download
No description or website provided.
Stars: ✭ 26 (+30%)
Mutual labels:  tencent
tencent-cam-policy
Easily create an Tencent CAM Policy with Serverless Components
Stars: ✭ 20 (+0%)
Mutual labels:  tencent
tencent-apigateway
Easily provision Tencent API Gateway using Serverless Components
Stars: ✭ 33 (+65%)
Mutual labels:  tencent
Awesome crawl
腾讯新闻、知乎话题、微博粉丝,Tumblr爬虫、斗鱼弹幕、妹子图爬虫、分布式设计等
Stars: ✭ 246 (+1130%)
Mutual labels:  tencent
xinge
腾讯信鸽push Golang lib
Stars: ✭ 25 (+25%)
Mutual labels:  tencent
flutter superplayer
适用于 Flutter 的腾讯云超级播放器插件
Stars: ✭ 13 (-35%)
Mutual labels:  tencent
tencent-scf
Deploy Tencent Cloud Serverless Cloud Function in seconds with Serverless Components.
Stars: ✭ 86 (+330%)
Mutual labels:  tencent
cli
The universal GraphQL API and CSPM tool for AWS, Azure, GCP, K8s, and tencent.
Stars: ✭ 811 (+3955%)
Mutual labels:  tencent
2018-Tencent-Lookalike
2018-腾讯广告算法大赛-相似人群拓展(初赛):10th/1563 (Top 0.64%)
Stars: ✭ 46 (+130%)
Mutual labels:  tencent
Ant-Live
【基于JAVA开发的在线直播平台】Ant Live;腾讯云直播服务;直播鉴黄;礼物;支付宝充值提现;弹幕聊天室;前端后分离;SpringBoot;直播平台开发;
Stars: ✭ 28 (+40%)
Mutual labels:  tencent
go-trustsql-sdk
基于 Golang 语言的腾讯区块链 TrustSQL SDK
Stars: ✭ 15 (-25%)
Mutual labels:  tencent
apijson-framework
腾讯 APIJSON 服务端框架,通过数据库表配置角色权限、参数校验等,简化使用。Tencent APIJSON Server Framework for configuring access of roles and validation of arguments in database tables, then using APIJSON easier.
Stars: ✭ 41 (+105%)
Mutual labels:  tencent
ABot-Graia
一个使用 Graia Ariadne 搭建的 QQ 功能性机器人。
Stars: ✭ 194 (+870%)
Mutual labels:  tencent
JD tencent scf
自用脚本,随缘更新
Stars: ✭ 440 (+2100%)
Mutual labels:  tencent
cordova-plugin-tencent-liteav
A cordova plugin for video playing with Tencent's LiteAV SDK. Support RTMP/HLS/FLV/MP4.
Stars: ✭ 24 (+20%)
Mutual labels:  tencent
ELFChatBot
闲聊QQ机器人,也就是人工智障
Stars: ✭ 61 (+205%)
Mutual labels:  tencent
laravel-queue-cmq
📦 Tencent Cloud Message Queue driver for Laravel Queue
Stars: ✭ 25 (+25%)
Mutual labels:  cmq

cmq-go

Tencent CMQ Golang SDK

与腾讯云官方SDK接口保持一致

Getting Started

所有的API中都有test case,这里使用CreateQueue举例。

var secretId = "YourTencentSecretId"
var secretKey = "YourTencentSecretKey"
var endpointQueue = "https://cmq-queue-sh.api.qcloud.com"
var endpointQueueInner = "http://cmq-queue-sh.api.tencentyun.com"

// 创建队列
func Test_CreateQueue(t *testing.T) {
    //创建账户
	account := cmq_go.NewAccount(endpointQueue, secretId, secretKey)
	
	//设置队列metadata
	meta := cmq_go.QueueMeta{}
	meta.PollingWaitSeconds = 10
	meta.VisibilityTimeout = 10
	meta.MaxMsgSize = 1048576
	meta.MsgRetentionSeconds = 345600

    //创建队列queue-test-001
	err := account.CreateQueue("queue-test-001", meta)
	if err != nil {
		t.Errorf("queue-test-001 created failed, %v", err.Error())
		return
	}
	t.Log("queue-test-001 created")

    //创建队列queue-test-002
	err = account.CreateQueue("queue-test-002", meta)
	if err != nil {
		t.Errorf("queue-test-002 created failed, %v", err.Error())
		return
	}
	t.Log("queue-test-002 created")
}

Test Case

测试单个方法
go test -v -test.run Test_CreateQueue

API Status

队列模型

队列相关接口

  • CreateQueue
  • ListQueue
  • GetQueueAttributes
  • SetQueueAttributes
  • DeleteQueue

消息相关接口

  • SendMessage
  • BatchSendMessage
  • ReceiveMessage
  • BatchReceiveMessage
  • DeleteMessage
  • BatchDeleteMessage

主题模型

主题相关接口

  • CreateTopic
  • SetTopicAttributes
  • ListTopic
  • GetTopicAttributes
  • DeleteTopic

消息相关接口

  • PublishMessage
  • BatchPublishMessage

订阅相关接口

  • Subscribe
  • ListSubscriptionByTopic
  • SetSubscriptionAttributes
  • GetSubscriptionAttributes
  • Unsubscribe
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].