Skip to content

Instantly share code, notes, and snippets.

@JoshuaFox
Last active June 16, 2020 14:23
Show Gist options
  • Save JoshuaFox/db431f1caddcac567f2425280591b41c to your computer and use it in GitHub Desktop.
Save JoshuaFox/db431f1caddcac567f2425280591b41c to your computer and use it in GitHub Desktop.
Reduce the number of executor threads used by PubSub Publisher
ExecutorProvider executorProvider =
InstantiatingExecutorProvider.newBuilder().setExecutorThreadCount(4).build();
Publisher.Builder builder =
Publisher.newBuilder(ProjectTopicName.of(proj, topic)).setExecutorProvider(executorProvider);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment