firebase_functions.pubsub_fn module Stay organized with collections Save and categorize content based on your preferences.
Functions to handle events from Google Cloud Pub/Sub.
Classes
Messageclassfirebase_functions.pubsub_fn.Message(message_id:str,publish_time:str,attributes:dict[str,str],data:str,ordering_key:str) | ||
|---|---|---|
Bases: Interface representing a Google Cloud Pub/Sub message.
|
MessagePublishedDataclassfirebase_functions.pubsub_fn.MessagePublishedData(message:Message[T],subscription:str) |
|---|
Bases: The interface published in a Pub/Sub publish subscription. 'T' Type representingMessage.data's JSON format.
|
Functions
on_message_publishedfirebase_functions.pubsub_fn.on_message_published(**kwargs)→Callable[[Callable[[CloudEvent[MessagePublishedData[T]]],None]],Callable[[CloudEvent[MessagePublishedData[T]]],None]] |
|---|
Event handler that triggers on a message being published to a Pub/Sub topic. Example: @on_message_published(topic="hello-world")defexample(event:CloudEvent[MessagePublishedData[object]])->None:pass
|
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-11-06 UTC.