Google Cloud PubSub Subscriber

Overview

You can use this Snap to subscribe or pull messages from a Google PubSub topic using the subscription name. This Snap uses the asynchronous streaming pull API.


Google Cloud PubSub Subscriber overview

Limitations

You must create subscriptions for the topic on the Google console.

Behavior change

The output of the Subscriber Snap has been updated. Previously, the message properties were displayed in string format; now, they are represented as key-value pairs under Message Attributes.


Google Cloud PubSub Subscriber behavior change

If the downstream Snap uses Message Attributes for further processing, then you need to reconfigure your pipeline.

Snap views

Type Description Examples of upstream and downstream Snaps
Input

Document

  • Min: 0
  • Max: 1

Each document contains data in the form of JSON.

  • Mapper
  • JSON Generator
  • CSV Parser
Output

Document

  • Min: 1
  • Max: 1

Each document contains a corresponding JSON response.

  • JSON Generator
Learn more about Error handling.

Snap settings

Note: Learn about the common controls in the Snap settings dialog.
Field/Field set Description
Label*

String

Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline.

Default value: PubSub Subscriber

Example: PubSub Subscriber

Subscription name*

String/Expression/ Suggestion

Specify the subscription name from which messages are to be pulled. The property is suggestable and retrieves available subscription names based on the Project ID from the service account.

Default value: N/A

Example: my-topic-subscription

Messages in buffer*

Integer/Expression

Specify the maximum number of messages in the buffer at a given time until they are acknowledged.

The default batch size for each pull request is 1000. If the requested messages in the buffer are less than 1000, the batch size will be set to the message count before subscribing to the messages.

Default value: 1000

Example: 500

Auto Acknowledge

Checkbox/Expression

Select this checkbox to auto-acknowledge the received messages. If selected, the Snap acknowledges the receipt of a message when the message listener returns successfully.

If you deselect this checkbox, the same data can be pulled, which means duplicate data is displayed in the output.

Default value: Deselected

Subscriber timeout

String/Expression

Specify the maximum time in seconds the Snap receives messages. A zero wait timeout means that fetching is performed without waiting.

Default value: 30

Example: 50

Snap Execution

Dropdown list

Choose one of the three modes in which the Snap executes. Available options are:
  • Validate & Execute: Performs limited execution of the Snap and generates a data preview during pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during pipeline runtime.
  • Execute only: Performs full execution of the Snap during pipeline execution without generating preview data.
  • Disabled: Disables the Snap and all Snaps that are downstream from it.

Default value: Validate & Execute