-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Should Publisher be shudown everytime ? #4628
Copy link
Copy link
Closed
Labels
api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.
Description
I have multiple scheduler which synchronize different kinds of data to different topics every 1 min.
Since my scheduler runs every 1 min either i have to either create an publisher on each invocation(and shutdown) of scheduler or i can maintain publisher as an spring bean and reuse the same.
Can you suggest which is better approach, cause i do see Deadline_Exceeded error intermittently ?
- Although i know primary cause of Deadline_Exceeded is due to clogging pub sub client with too many messages but could this also impact it ?
Also i read in one of the issues #1751 if we do no call shutdown on publisher it does not exit from JVM and threads are still alive . Which threads are these , thread used by RPC to publish each message ?
- Basically if i am publishing 100 messages then 100 threads are alive ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.