-2

Can anyone share spring boot GCP PUBSUB subscriber application example, which keep running util externally killed (not rest api)?

1 Answers1

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