The pubSubSource function creates a new input source that receives messages from Google PubSub. The example below subscribes to the subscription subscription-name-1 and receives JSON encoded messages sent to that subscription.
serivce account email ID that is authorized to access project resources
privateKey
private key used to authenticate access
encoder
defines how the raw data received from Kafka should be converted into message objects
subscriptionName
name of subscription to subscribe to in order to receive messages
maxMsgBatchSize
the max number of unacknowledged messages that client can have at a time, default value is 20
preprocessor
optional preprocessing function that allows for manipulation of the incoming message before decoding the message's payload. This can for instance be used for messages that are enveloped in some way
Metadata
Name
Description
EventSourcedMetadata.EventType
the event that originally generated the message
EventSourcedMetadata.Timestamp
the date/time when the topic originally received the message
Metrics
Name
Description
Type
Tags
cookie_cutter.pubsub_source.msg_received
increases the number of messages received from subscription