nodejs-pubsub icon indicating copy to clipboard operation
nodejs-pubsub copied to clipboard

Remove warning for exactly-once subscriptions

Open frimuchkov opened this issue 3 years ago • 5 comments

Hi!

In the latest version you fire an error (warning): WARNING: Exactly-once subscriptions are not yet supported by the Node client library. This feature will be added in a future release. by default . Is it possible to disable it?

frimuchkov avatar Aug 10 '22 11:08 frimuchkov

@frimuchkov This warning was requested by the Pub/Sub team to warn users that the library won't function 100% correctly with exactly-once subscriptions yet. That feature is coming before not too long, but there are some issues with trying to use it with an exactly-once subscription right now.

That warning should theoretically only be happening once per minute per subscriber, and if it's coming more often than that, I should probably look into it.

feywind avatar Aug 11 '22 17:08 feywind

@feywind thanks for your answer! Yes, this warning heppening once per minute, but in logs it looks like an error... Is it possible to provide logger or just pass a flag to disable this messsage?

image

frimuchkov avatar Aug 13 '22 08:08 frimuchkov

@frimuchkov The most correct way to disable that log is not to use an exactly-once subscription with the Node client library yet - we put that warning in to make sure no one thought that it would actually work properly (e.g. no ack with response yet). I'm hoping the exactly-once support will be coming in not too much longer, but it's not merged yet.

I hate to be a blocker, so you could do something like monkey-patching console.error and filtering out that warning, but the best thing to do for correct operation is not to use it with exactly-once subscriptions yet.

feywind avatar Aug 15 '22 19:08 feywind

@feywind but I don't use exactly-once subscription with the Node client library :)

Okey, I'll wait for support, this errors is not a big deal, just a little bit annoying.

Thanks a lot for your reply.

frimuchkov avatar Aug 15 '22 19:08 frimuchkov

@frimuchkov It should be responding to the exactly-once flag in subscription messages, so maybe it accidentally got turned on for that subscription?

feywind avatar Aug 15 '22 19:08 feywind

We released the actual EOD support, so I think this should be cleared up. Let me know if not.

feywind avatar Nov 09 '22 20:11 feywind