检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and
The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and
environment ak := os.Getenv("CLOUD_SDK_AK") sk := os.Getenv("CLOUD_SDK_SK") auth := basic.NewCredentialsBuilder(). WithAk(ak).
The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and
The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and
The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and
The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and
The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and
The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and
The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and
String ak = "{CLOUD_SDK_AK}"; //访问密钥ID。查看AK的方法请参见获取AK/SK。 String sk = "{CLOUD_SDK_SK}"; //与访问密钥ID结合使用的密钥。查看SK的方法请参见获取AK/SK。
The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and
ggg1BBIINPXsidG9rZ API同时支持使用AK/SK认证,AK/SK认证是使用SDK对请求进行签名,签名过程会自动往请求中添加Authorization(签名认证信息)和X-Sdk-Date(请求发送的时间)请求头。 AK/SK认证的详细说明请参见认证鉴权的“AK/SK认证”。 对于管理员创建
设置权限(角色名和密钥) producer.set_session_credentials( "ROCKETMQ_AK", # 角色名称 "ROCKETMQ_SK", # 角色密钥 '' )#用户名和密钥直接硬编
AccessKey: os.Getenv("ROCKETMQ_AK"), //用户名和密钥直接硬编码到代码中或者明文存储都存在很大的风险,建议在配置文件或者环境变量中密文存放,使用时解密。 SecretKey: os.Getenv("ROCKETMQ_SK"), })
dlq_increase 死信消息增长量 死信主题一分钟内增加的消息数量 单位:Count >=0 RocketMQ实例的死信队列 1分钟 维度 Key Value reliablemq_instance_id RocketMQ实例 reliablemq_broker RocketMQ实例节点
管理实例 查看和修改RocketMQ实例基本信息 查看RocketMQ实例后台任务 配置RocketMQ实例标签 导出RocketMQ实例列表 诊断RocketMQ实例 重启RocketMQ实例的Broker节点 删除RocketMQ实例 配置RocketMQ实例回收站策略 修改RocketMQ实例的SSL配置
与Kafka、RabbitMQ的差异 表1 功能差异 功能项 RocketMQ Kafka RabbitMQ 优先级队列 不支持 不支持 3.8.35版本:支持。建议优先级大小设置在0-10之间。 AMQP-0-9-1版本:支持。优先级大小设置在1-9之间。 延迟队列 支持 不支持
查看RocketMQ实例后台任务 对实例的一些操作,如表1所示,会启动一个后台任务,您可以在后台任务页,查看该操作的状态等信息,同时可通过删除操作,清理任务信息。 表1 后台任务列表 任务名 说明 创建实例 创建一个RocketMQ实例。 重启实例 重启RocketMQ实例。 修改是否开启SSL
收发普通消息 本章节介绍普通消息的收发方法和示例代码。其中,普通消息发送方式分为同步发送和异步发送。 同步发送:消息发送方发出一条消息到服务端,服务端接收并处理消息,然后返回响应给发送方,发送方收到响应后才会发送下一条消息。 异步发送:消息发送方发出一条消息后,不等服务端返回响应,接着发送下一条消息。