Pushes a message to a specified consumer.

Usage notes

This operation is used to verify the message consumption status.

QPS limit

The queries-per-second (QPS) limit on this operation is 10 per user. Throttling is triggered when the number of calls to this operation per second exceeds the QPS limit. Throttling may affect your business. Therefore, call this operation based on your needs. For more information, see QPS limits.

Authorization information

By default, only Alibaba Cloud accounts can call this operation. RAM users can call this operation only after they are authorized to use it. The following table lists the authorization information of this operation. For more information, see Policies and examples.



Resource with a namespace

Resource without a namespace





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 group ID of the consumer to which you want to push a message. 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 topic to which the message is pushed.

Response parameters

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

The ID of the request, which is a common parameter. Each request has a unique ID to facilitate troubleshooting and fault locating.


Sample requests

http(s)://ons.cn-hangzhou.aliyuncs.com/? Action=OnsMessagePush
&ClientId=30.5.121. **@24813#-1999745829#-1737591554#453111174894656
&<Common request parameters>

Sample success responses

XML format


JSON format

    "RequestId": "B8EDC90D-F726-4B9E-8BEF-F0DD25EC****"

Error codes

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