Globals

Abstract types

ClientConfig

object

Properties

Parameter

projectId

Optional

string

The project ID from the Google Developer's Console, e.g. 'grape-spaceship-123'. We will also check the environment variable GCLOUD_PROJECT for your project ID. If your app is running in an environment which supports Application Default Credentials, your project ID will be detected automatically.

keyFilename

Optional

string

Full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console. If you provide a path to a JSON file, the projectId option above is not necessary. NOTE: .pem and .p12 require you to specify the email option as well.

apiEndpoint

Optional

string

The apiEndpoint from options will set the host. If not set, the PUBSUB_EMULATOR_HOST environment variable from the gcloud SDK is honored, otherwise the actual API endpoint will be used.

email

Optional

string

Account email address. Required when using a .pem or .p12 keyFilename.

credentials

Optional

object

Credentials object.

Values in credentials have the following properties:

Parameter

client_email

Optional

string

private_key

Optional

string

autoRetry

Optional

boolean

Automatically retry requests if the response is related to rate limits or certain intermittent server errors. We will exponentially backoff subsequent requests by default.

maxRetries

Optional

number

Maximum number of automatic retries attempted before returning the error.

promise

Optional

Constructor

Custom promise module to use instead of native Promises.

CreateSubscriptionRequest

object

Options for creating a subscription.

See a Subscription resource.

Properties

Parameter

flowControl

Optional

object

Flow control configurations for receiving messages. Note that these options do not persist across subscription instances.

Values in flowControl have the following properties:

Parameter

maxBytes

Optional

number

The maximum number of bytes in un-acked messages to allow before the subscription pauses incoming messages. Defaults to 20% of free memory.

maxMessages

Optional

number

The maximum number of un-acked messages to allow before the subscription pauses incoming messages.

gaxOpts

Optional

object

Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/CallSettings.html.

messageRetentionDuration

Optional

(number or date)

Set this to override the default duration of 7 days. This value is expected in seconds. Acceptable values are in the range of 10 minutes and 7 days.

pushEndpoint

Optional

string

A URL to a custom endpoint that messages should be pushed to.

retainAckedMessages

Optional

boolean

If set, acked messages are retained in the subscription's backlog for the length of time specified by options.messageRetentionDuration.

expirationPolicy

Optional

ExpirationPolicy

A policy that specifies the conditions for this subscription's expiration.

TopicExistsCallback

TopicExistsCallback(err, exists)

Parameter

err

Error

Request error, if any.

Value may be null.

exists

boolean

Whether the topic exists.

TopicExistsResponse

array

Property

Parameter

0

boolean

Whether the topic exists