หน้านี้ยังไม่พร้อมใช้งานในภาษาท้องถิ่นของคุณ เรากำลังพยายามอย่างหนักเพื่อเพิ่มเวอร์ชันภาษาอื่น ๆ เพิ่มเติม ขอบคุณสำหรับการสนับสนุนเสมอมา

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

AMQP Client Access

Updated on 2024-11-06 GMT+08:00

After configuring and activating rules by calling the platform APIs Creating a Rule Triggering Condition, Creating a Rule Action, and Modifying a Rule Triggering Condition, connect the AMQP client to IoTDA. Then run the AMQP client on your server to receive subscribed-to messages.

Protocol Version

For details on AMQP, see AMQP.

The IoT platform supports only AMQP 1.0.

Connection Establishment and Authentication

  1. The AMQP client establishes a TCP connection with the platform and performs TLS handshake verification.
    NOTE:

    To ensure security, the AMQP client must use TLS 1.2 for encryption. Non-encrypted TCP transmission is not supported. The difference between the client time and standard time cannot be greater than 5 minutes. Otherwise, the connection will fail.

  2. The client requests to set up a connection.
  3. The client sends a request to the platform to establish a receiver link (a unidirectional channel for the platform to push data to the client). The receiver link must be set up within 15 seconds after the connection is set up on the client. Otherwise, the platform will close the connection. After the receiver link is set up, the client is connected to the platform.
    NOTE:

    A maximum of 10 receiver links can be created for a connection, and sender links cannot be created. Therefore, the platform can push messages to the client, but the client cannot send messages to the platform.

Connection Configuration Parameters

The table below describes the connection address and connection authentication parameters for the AMQP client to connect to the platform.

  • AMQP access address: amqps://${server.address}:5671

  • Connection string: amqps://${server.address}:5671?amqp.vhost=default&amqp.idleTimeout=8000&amqp.saslMechanisms=PLAIN

    Parameter

    Description

    server.address

    AMQP server access address. Obtaining method: Log in to the console, choose IoTDA Instances, and click the target instance card. In the navigation pane, choose Overview. Click Access Details in the Instance Information area, and check the AMQPS access address.

    Figure 1 Obtaining access information

    amqp.vhost

    Currently, AMQP uses the default host. Only the default host is supported.

    amqp.saslMechanisms

    Connection authentication mode. Currently, PLAIN-SASL is supported.

    amqp.idleTimeout

    Heartbeat interval, in milliseconds. If the heartbeat interval expires and no frame is transmitted on the connection, the platform closes the connection.

  • Port: 5671
  • Client identity authentication parameters

    username ="accessKey=${accessKey}|timestamp=${timestamp}|instanceId=${instanceId}"

    password = "${accessCode}"

    Parameter

    Mandatory or Optional

    Description

    accessKey

    Mandatory

    An accessKey can be used to establish a maximum of 32 concurrent connections. When establishing a connection for the first time, preset the parameter by following the instructions provided in Obtaining the AMQP Access Credential.

    timestamp

    Mandatory

    Indicates the current time. The value is a 13-digit timestamp, accurate to milliseconds.

    The server verifies the client timestamp. There is a 5-minute difference between the client timestamp and server timestamp.

    instanceId

    Optional

    Instance ID. This parameter is mandatory when multiple instances of the standard edition are purchased in the same region. For details, see Viewing Instance Details.

    accessCode

    Mandatory

    The value can contain a maximum of 256 characters. When establishing a connection for the first time, preset the parameter by following the instructions provided in Obtaining the AMQP Access Credential. If the accessCode is lost, you can call the API Generating an Access Credential or follow the instructions provided in Obtaining the AMQP Access Credential to reset the accessCode.

Obtaining the AMQP Access Credential

If an application uses AMQP to access the platform for data transfer, preset an access credential. You can call the API Generating an Access Credential or use the console to preset an access credential. The procedure for using the console to generate an access credential is as follows:

  1. Choose IoTDA Instances, select the edition of your instance, and click Details to go to the instance details page.
  2. Click Preset Access Credential to preset the accessCode and accessKey.

    Figure 2 Instance management - Preset access credential
    NOTE:

    If you already have an access credential, the accessKey cannot be used after you preset the access credential again.

Connection Specifications

Key

Documentation

Maximum number of queues that can be subscribed for a connection

10

Maximum number of queues for a user

100

Maximum number of connections for a tenant

32

Cache duration of a message (days)

1

Receiving Push Messages

After the receiver link between the client and platform is established, the client can proactively pull data or register a listener to enable the platform to push data. The proactive mode is recommended, because the client can pull data based on its own capability.

เราใช้คุกกี้เพื่อปรับปรุงไซต์และประสบการณ์การใช้ของคุณ การเรียกดูเว็บไซต์ของเราต่อแสดงว่าคุณยอมรับนโยบายคุกกี้ของเรา เรียนรู้เพิ่มเติม

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback