The suggested way of creating a subscription is by calling through
{@see \Google\Cloud\PubSub\Topic::subscribe()} or {@see \Google\Cloud\PubSub\Topic::subscription()}.
Returns subscription info in the format detailed in the documentation
for a subscription.
**NOTE: Some methods of instantiation of a Subscription do not supply a
topic name. The topic name is required to create a subscription.**
Example:
$topic = $pubsub->topic('my-new-topic');
$subscription = $topic->subscription('my-new-subscription');
$result = $subscription->create();
public create ( array $options = [] ) : array | ||
$options | array | [optional] { Configuration Options @type int $ackDeadlineSeconds This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. **Defaults to** `10`. @type array $pushConfig See {@see \Google\Cloud\PubSub\Subscription::modifyPushConfig()} or [PushConfig](https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions#PushConfig) for usage. } |
Результат | array | An array of subscription info |