Pushes a message to a specified consumer.

Scenarios

The OnsMessagePush operation is used for consumption verification.

Limits

You can call the OnsMessagePush operation up to 600 times per minute.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes OnsMessagePush

The operation that you want to perform. Set the value to OnsMessagePush.

ClientId String Yes 30.5.121.**@24813#-1999745829#-1737591554#453111174894656

The ID of the consumer instance. You can call the OnsConsumerGetConnection operation to query the ID.

GroupId String Yes GID_test_group_id

The ID of the group. For more information, see Terms.

InstanceId String Yes MQ_INST_111111111111_DOxxxxxx

The ID of the instance where the message to be pushed is located.

MsgId String Yes 0BC1669963053CF68F733BB70396****

The ID of the message.

Topic String Yes test-mq_topic

The target topic to which the message is pushed.

Response parameters

Parameter Type Example Description
RequestId String B8EDC90D-F726-4B9E-8BEF-F0DD25EC18D2

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/? Action=OnsMessagePush
&ClientId=30.5.121. **@24813#-1999745829#-1737591554#453111174894656
&GroupId=GID_test_group_id
&InstanceId=MQ_INST_111111111111_DOxxxxxx
&MsgId=0BC1669963053CF68F733BB70396****
&Topic=test-mq_topic
&<Common request parameters>

Sample success responses

XML format

<OnsMessagePushResponse>
      <RequestId>B8EDC90D-F726-4B9E-8BEF-F0DD25EC18D2</RequestId>
</OnsMessagePushResponse>

JSON format

{
    "RequestId": "B8EDC90D-F726-4B9E-8BEF-F0DD25EC18D2"
}

Error codes

For a list of error codes, visit the API Error Center.