Functions to handle events from Google Cloud Pub/Sub.
Classes
Messageclass firebase_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.
|
MessagePublishedDataclass firebase_functions.pubsub_fn.MessagePublishedData(message: Message[T], subscription: str) |
---|
Bases: The interface published in a Pub/Sub publish subscription. 'T' Type representing Message.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") def example(event: CloudEvent[MessagePublishedData[object]]) -> None: pass
|