Examples
GET function example for fetching message from Cloud Pub/Sub subscription
The following is an example of a GET map rule used to retrieve messages from a Cloud Pub/Sub subscription and performing authentication explicitly based on the specified credentials file. Messages are acknowledged as part of committing the source transaction.
GET("GCPUBSUB", "-CF creds_file -S subscription_name -ACK TRANSACTIONAL -TV")
PUT function example for inserting message to a Cloud Pub/Sub topic
The following is an example of a PUT map rule used to write messages to a Cloud Pub/Sub topic and create the topic if it does not exist already. Publish timeout is set to 10 seconds. Authentication is performed automatically, such as using the GOOGLE_APPLICATION_CREDENTIALS environment variable.
PUT("GCPUBSUB", "-T topic_name -CT -PT 10 -TE+ log_file", input_data)