method GcpPubSubBroker.prototype.publish
GcpPubSubBroker.prototype.publish<T>(
topic: string,
message: T
): Promise<void>

Publishes a message to a topic.

Type Parameters

The payload type

Parameters

topic: string

Destination topic

message: T

The payload (serialized by the broker adapter)

Return Type

Promise<void>

Usage

import { GcpPubSubBroker } from "messaging-plugin/src/index.ts";