Namespace: pubsub
Stay organized with collections
Save and categorize content based on your preferences.
Methods
exampleMessage
static
exampleMessage() returns functions.pubsub.Message
Fetch an example Message already populated with data.
- Returns
-
non-null functions.pubsub.Message
makeMessage
static
makeMessage(encodedString, attributes) returns functions.pubsub.Message
Function to create a Pubsub event for a message with data payload in the form of a base64-encoded string.
Parameter
|
encodedString
|
string
Base64-encoded string for the content of a pubsubMessage .
|
attributes
|
Optional
Object
Attributes of pubsubMessage to specify.
Value may be null.
|
- Returns
-
non-null functions.pubsub.Message
makeMessage
static
makeMessage(json, attributes) returns functions.pubsub.Message
Function to create a Pubsub event for a message with JSON payload.
Parameter
|
json
|
Object
Content of pubsubMessage as a JSON payload.
Value must not be null.
|
attributes
|
Optional
Object
Attributes of pubsubMessage to specify.
Value may be null.
|
- Returns
-
non-null functions.pubsub.Message
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2019-12-03 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]