/**
* Triggered from a message on a Cloud Pub/Sub topic.
*
* @param {object} pubsubMessage The Cloud Pub/Sub Message object.
* @param {string} pubsubMessage.data The "data" property of the Cloud Pub/Sub Message.
*/
exports.subscribe = pubsubMessage => {
// Print out the data from Pub/Sub, to prove that it worked
console.log(Buffer.from(pubsubMessage.data, 'base64').toString());
};
# Triggered from a message on a Cloud Pub/Sub topic.
def subscribe(event, context):
# Print out the data from Pub/Sub, to prove that it worked
print(base64.b64decode(event['data']))