We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
When using the pubsub java client, how long should a Publisher object live for ?
In a scenario where we get frequent HTTP requests that get translated into Pubsub messages, doing
try { publisher = Publisher.defaultBuilder(topic).build(); //... do publish stuff } finally { if (publisher != null) { publisher.shutdown(); } }
each time seems inefficient. I couldn't find any documentation on the expected lifetime of the object.
How often should the publisher be shutdown (either in terms of time or messages published) ?
When using the pubsub java client, how long should a Publisher object live for ?
In a scenario where we get frequent HTTP requests that get translated into Pubsub messages, doing
each time seems inefficient. I couldn't find any documentation on the expected lifetime of the object.
How often should the publisher be shutdown (either in terms of time or messages published) ?