sdk/aliyun-mq-http-php-sdk/MQClient.php
public function getConsumer($instanceId, $topicName, $consumer, $messageTag = NULL)
    {
        if ($topicName == NULL || $topicName == "") {
            throw new InvalidArgumentException(400, "TopicName is null or empty");
        }
        if ($consumer == NULL || $consumer == "" ) {
            throw new InvalidArgumentException(400, "Consumer is null or empty");
        }
        return new MQConsumer($this->client, $instanceId, $topicName, $consumer, $messageTag);
    }
public function getConsumer($instanceId, $topicName, $consumer, $messageTag = NULL)
    {
        if ($topicName == NULL || $topicName == "") {
            throw new InvalidArgumentException(400, "TopicName is null or empty");
        }
        if ($consumer == NULL || $consumer == "" ) {
            throw new InvalidArgumentException(400, "Consumer is null or empty");
        }
        return new MQConsumer($this->client, $instanceId, $topicName, $consumer, $messageTag);
    }
public function getConsumer ( $ instanceId , $ topicName , $ consumer , $ messageTag = NULL ) { if ( $ topicName == NULL || $ topicName == "" ) { throw new InvalidArgumentException ( 400 , "TopicName is null or empty" ) ; } if ( $ consumer == NULL || $ consumer == "" ) { throw new InvalidArgumentException ( 400 , "Consumer is null or empty" ) ; } return new MQConsumer ( $ this -> client , $ instanceId , $ topicName , $ consumer , $ messageTag ) ; }
Returns a Consumer reference for consume and ack message to topic

@param string $instanceId: instance id
@param string $topicName:  the topic name
@param string $consumer: the consumer name / ons cid
@param string $messageTag: filter tag for consumer. If not empty, only consume the message which's messageTag is equal to it.

@return MQConsumer $topic: the Producer instance
Returns a Consumer reference for consume and ack message to topic