PubSub/src/PubSubClient.php
public function consume(array $requestData)
    {
        return $this->messageFactory($requestData, $this->connection, $this->projectId, $this->encode);
    }
public function consume(array $requestData)
    {
        return $this->messageFactory($requestData, $this->connection, $this->projectId, $this->encode);
    }
public function consume ( array $ requestData ) { return $ this -> messageFactory ( $ requestData , $ this -> connection , $ this -> projectId , $ this -> encode ) ; }
Consume an incoming message and return a PubSub Message.

This method is for use with push delivery only.

Example:
```
$httpPostRequestBody = file_get_contents('php://input');
$requestData = json_decode($httpPostRequestBody, true);

$message = $pubsub->consume($requestData);
```

@param array $requestBody The HTTP Request body
@return Message
Consume an incoming message and return a PubSub Message .