Namespace: pubsub

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 

Firebase gives you the tools and infrastructure you need to build better mobile and web apps, improve app quality, and grow your business.

Updated Mar 4, 2025

Firebase Authentication lets you add an end-to-end identity solution to your app for easy user authentication, sign-in, and onboarding in just a few lines of code.

Updated Mar 4, 2025

Firebase gives you the tools and infrastructure you need to build better mobile and web apps, improve app quality, and grow your business.

Updated Dec 30, 2024