Version: v1
Class: Topic
Implements#
NamedTopicTopicWithCustomProject
Constructors#
constructor#
• new Topic()
Defined in#
Properties#
mq#
• Protected mq: PubSubService
Defined in#
name#
• Readonly name: string = ''
Implementation of#
NamedTopic.name
Defined in#
project#
• Optional project: GooglePubSubProject
Implementation of#
TopicWithCustomProject.project
Defined in#
retryConfig#
• retryConfig: RetryConfig
Defined in#
Methods#
getName#
â–¸ getName(): string
Returns#
string
Defined in#
publish#
â–¸ publish<T>(message, options?): Promise<string>
Type parameters#
| Name | Type |
|---|---|
T | extends Payload |
Parameters#
| Name | Type |
|---|---|
message | T |
options? | TopicPublishOptions |
Returns#
Promise<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
Parameters#
| Name | Type | Description |
|---|---|---|
message | Payload | Message |
Returns#
void
Defined in#
validateTopic#
â–¸ validateTopic(name): void
Parameters#
| Name | Type |
|---|---|
name | string |
Returns#
void