tencent cloud

TDMQ for CMQ

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Overview
Features
Strengths
Use Cases
Use Limits
Basic Concepts
Purchase Guide
Billing Overview
Purchase Methods
Pricing Overview
Payment Overdue
Refund
Getting Started
Getting Started with Queue Model
Getting Started with Topic Model
Operation Guide
Queue Service
Topic Subscription
Access Management (CAM)
Tag Management
Alarm Configuration
Message Query and Trace
Practical Tutorial
Message Deduplication
Push/Pull Selection
Success Stories
Online Image Processing
Qidian.com
Development Guide
HTTP Endpoint Subscription
General References
API Documentation
API Documentation
API 2.0 to 3.0 Switch Guide
SDK Documentation
HTTP Data Flow SDK
HTTP Control Flow SDK
SDK Parameter Configuration Description
FAQs
Features
Operations
Service Level Agreement
Contact Us
Glossary

Sending Message

PDF
フォーカスモード
フォントサイズ
最終更新日: 2024-01-03 10:20:36

API Description

This API is used to send a message to a specified queue.
The public/private domain names for API requests can be copied from Queue Service > API Request Address in the TDMQ for CMQ console. A sample address is as follows:
Public network address: https://cmq-gz.publicXXX.tencenttdmq.com
Private network address: http://gz.mqadapter.cmq.tencentyun.com
Note:
The API call URL varies by region.
Whenever downstream traffic is generated from using the public domain name, traffic fees will be charged (even during the beta test period). Therefore, we strongly recommend you use the private domain name to avoid traffic fees.

Input Parameters

The list below contains only the API request parameters. Other parameters can be found in Common Request Parameters.
Parameter
Required
Type
Description
queueName
Yes
String
Queue name, which must be unique under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
msgBody
Yes
String
Message body, which must be 1 byte at least. The maximum length is subject to the configured max message size attribute.
delaySeconds
No
Int
This field indicates how many seconds it should take for the messages to be visible after they are sent to the queue.

Output Parameters

Parameter
Type
Description
code
Int
0: Success. others: Error. For more information, see Common Error Codes.
message
String
Error message.
requestId
String
Request ID generated by the server, which can be submitted to the backend for troubleshooting when an internal server error occurs.
msgId
String
Unique ID of the message generated by the server.

Error Codes

For more information, see Common Error Codes.

Samples

Input:
https://domain/v2/index.php?Action=SendMessage
&queueName=test-queue-123
&msgBody=helloworld
&<<a href="">Common request parameters</a>>
Output:
{
"code" : 0,
"message" : "",
"requestId":"14534664555",
"msgId":"123345346"
}


ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック