public static final class SendMessageRequest.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
SendMessageRequest |
build() |
SendMessageRequest.Builder |
instanceId(String instanceId)
The ID of the ApsaraMQ for MQTT instance.
|
SendMessageRequest.Builder |
mqttTopic(String mqttTopic)
The topic to which you want to send a message on the ApsaraMQ for MQTT instance.
|
SendMessageRequest.Builder |
payload(String payload)
The message content, which is the payload of the message.
|
SendMessageRequest.Builder |
regionId(String regionId)
This parameter is required.
|
public SendMessageRequest.Builder regionId(String regionId)
This parameter is required.
public SendMessageRequest.Builder instanceId(String instanceId)
The ID of the ApsaraMQ for MQTT instance. The ID must be consistent with the ID of the instance that the ApsaraMQ for MQTT client uses. You can view the instance ID in the Basic Information section on the Instance Details page that corresponds to the instance in the ApsaraMQ for MQTT console.
This parameter is required.
example:post-cn-0pp12gl****
public SendMessageRequest.Builder mqttTopic(String mqttTopic)
The topic to which you want to send a message on the ApsaraMQ for MQTT instance.
This parameter is required.
example:TopicA
public SendMessageRequest.Builder payload(String payload)
The message content, which is the payload of the message. We recommend that you encode the content in Base64 to prevent non-printable characters from being transmitted.
This parameter is required.
example:test
public SendMessageRequest build()
Copyright © 2025. All rights reserved.