Skip to content

Commit

Permalink
fix: TECH add more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene-taran committed Dec 15, 2023
1 parent 2ece9e7 commit 09c499d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/pubsub/src/Publisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@ export class Publisher<T = unknown> {
private readonly avroMessageMetadata?: Record<string, string>
private readonly fieldsProcessor = new FieldsProcessor()
//TODO: remove flags below, when only avro will be used
private topicHasAssignedSchema = false
private privateTopicHasAssignedSchema = false
get topicHasAssignedSchema(): boolean {
return this.privateTopicHasAssignedSchema
}
set topicHasAssignedSchema(value: boolean) {
this.privateTopicHasAssignedSchema = value
this.logger?.info(`topicHasAssignedSchema set to ${JSON.stringify(value)}`)
}
private avroSchemasProvided = false

constructor(readonly topicName: string, readonly client: PubSub, private readonly logger?: ILogger,
Expand Down Expand Up @@ -228,7 +235,7 @@ export class Publisher<T = unknown> {

private async doesTopicHaveSchemaAssigned(): Promise<boolean> {
const [metadata] = await this.topic.getMetadata()
this.logger?.info('receivedMetadata:', JSON.stringify(metadata))
this.logger?.info('receivedMetadata:', metadata)
const schemaName = metadata?.schemaSettings?.schema
return !!schemaName
}
Expand Down

0 comments on commit 09c499d

Please sign in to comment.