Skip to content

Commit

Permalink
fix: set topic sequence number and page to subscription state on disc…
Browse files Browse the repository at this point in the history
…ontinuity
  • Loading branch information
rishtigupta committed Nov 15, 2024
1 parent 5ead127 commit a088947
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/client-sdk-nodejs/src/internal/pubsub-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,10 @@ export class PubsubClient extends AbstractPubsubClient<ServiceError> {
truncateString(options.topicName),
topicDiscontinuity.toString()
);
options.subscriptionState.lastTopicSequenceNumber =
resp.discontinuity.new_topic_sequence;
options.subscriptionState.lastTopicSequencePage =
resp.discontinuity.new_sequence_page;
options.onDiscontinuity(topicDiscontinuity);
} else {
this.getLogger().error(
Expand Down
4 changes: 4 additions & 0 deletions packages/client-sdk-web/src/internal/pubsub-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ export class PubsubClient<
options.topicName
)}; ${topicDiscontinuity.toString()}`
);
options.subscriptionState.lastTopicSequenceNumber =
discontinuity.getNewTopicSequence();
options.subscriptionState.lastTopicSequencePage =
discontinuity.getNewSequencePage();
options.onDiscontinuity(topicDiscontinuity);
} else {
this.getLogger().error(
Expand Down

0 comments on commit a088947

Please sign in to comment.