Version: v2
Class: Topic<P>
#
Type parametersName | Type |
---|---|
P | extends Payload Payload |
#
Constructors#
constructor• new Topic<P
>()
#
Type parametersName | Type |
---|---|
P | extends Payload Payload |
#
Defined in#
Properties#
options• options: TopicOptions
= defaultOptions
#
Defined in#
projectâ–ª Static
Optional
project: GooglePubSubProject
#
Defined in#
topicNameâ–ª Static
Readonly
topicName: string
#
Defined in#
Methods#
publishâ–¸ publish(message
, options?
): Promise
<string
>
#
ParametersName | Type |
---|---|
message | PayloadInput <P > |
options? | TopicPublishOptions |
#
ReturnsPromise
<string
>
#
Defined in#
validateMessageâ–¸ validateMessage(message
): void
This is run before publishing any messages, it is a no-op by default. Can overwrite to perform checks against payload before publishing
#
ParametersName | Type | Description |
---|---|---|
message | PayloadInput <P > | Message to be published |
#
Returnsvoid
#
Defined in#
validateTopicâ–¸ Static
validateTopic(name
): void
This is run once when Topic is init to verify topic name
#
ParametersName | Type | Description |
---|---|---|
name | string | topicName |
#
Returnsvoid