-
Notifications
You must be signed in to change notification settings - Fork 44
Closed
Description
Subscriptions in 5.2.0 are not infinite: once we get 100 events we get the last event callback and the connection closes. I've debugged it to this line where subscription.info.isInfiniteEventRequest is set in the if statement but not in the else statement.
pub-sub-api-node-client/dist/client.js
Line 727 in be6e650
| subscription = { |
if (subscription) {
this.#logger.debug(
`${topicName} - Reusing cached gRPC subscription`
);
grpcSubscription = subscription.grpcSubscription;
subscription.info.receivedEventCount = 0;
subscription.info.requestedEventCount = subscribeRequest.numRequested;
subscription.info.isInfiniteEventRequest = isInfiniteEventRequest;
} else {
this.#logger.debug(
`${topicName} - Establishing new gRPC subscription`
);
grpcSubscription = this.#client.Subscribe();
subscription = {
info: {
isManaged: false,
topicName,
requestedEventCount: subscribeRequest.numRequested,
receivedEventCount: 0,
lastReplayId: null,
isInfiniteEventRequest: isInfiniteEventRequest // NEW LINE NEEDED HERE
},
grpcSubscription,
subscribeCallback
};
this.#subscriptions.set(topicName, subscription);
}
Metadata
Metadata
Assignees
Labels
No labels