Can anyone share spring boot GCP PUBSUB subscriber application example, which keep running util externally killed (not rest api)?
Asked
Active
Viewed 112 times
1 Answers
0
Normally, our documentation instructs users to provide their own ThreadPoolTaskScheduler
bean named pubsubSubscriberThreadPool
with non-daemon threads to keep the application running. However, this seems to have stopped working and is currently an open issue.
In the meantime, you can provide a scheduled no-op process as a workaround:
@Scheduled (fixedRate = 1, timeUnit = TimeUnit.MINUTES)
public void ensureApplicationRuns() {
// do nothing, or log message
}

Elena Felder
- 456
- 3
- 8