Version: v1
Class: Topic
#
ImplementsNamedTopic
TopicWithCustomProject
#
Constructors#
constructor• new Topic()
#
Defined in#
Properties#
mq• Protected
mq: PubSubService
#
Defined in#
name• Readonly
name: string
= ''
#
Implementation ofNamedTopic.name
#
Defined in#
project• Optional
project: GooglePubSubProject
#
Implementation ofTopicWithCustomProject.project
#
Defined in#
retryConfig• retryConfig: RetryConfig
#
Defined in#
Methods#
getNameâ–¸ getName(): string
#
Returnsstring
#
Defined in#
publishâ–¸ publish<T
>(message
, options?
): Promise
<string
>
#
Type parametersName | Type |
---|---|
T | extends Payload |
#
ParametersName | Type |
---|---|
message | T |
options? | TopicPublishOptions |
#
ReturnsPromise
<string
>
#
Defined in#
validateMessageâ–¸ validateMessage(message
): void
todo
implement message validation logic. tried to link Topic and Message using static name methods, but hit a wall with subclass static inheritance typescript issues
#
ParametersName | Type | Description |
---|---|---|
message | Payload | Message |
#
Returnsvoid
#
Defined in#
validateTopicâ–¸ validateTopic(name
): void
#
ParametersName | Type |
---|---|
name | string |
#
Returnsvoid