spring boot - How to recover data from Google pubsub topic subscription when my service is down - Stack Overflow

I have subscribed to a Google pubsub topic from my spring boot application with subscription.What happ

I have subscribed to a Google pub/sub topic from my spring boot application with subscription.What happens if my service is down and There is some data which is pushed to pub/sub topic. Will i receive data to my application from the subscription when my service is up?

I have subscribed to a Google pub/sub topic from my spring boot application with subscription.What happens if my service is down and There is some data which is pushed to pub/sub topic. Will i receive data to my application from the subscription when my service is up?

Share Improve this question asked Jan 29 at 14:17 qwertyqwerty 252 silver badges9 bronze badges 3
  • Typically, yes. I am not familiar with how spring boot pulls messages from a queue, but the way it normally works is your application takes a message, processes it, then confirms to the subscription it no longer needs that message. Messages won't remain on a topic indefinitely ... check with the owner of the topic how long your grace period is, but the whole system is designed to allow for intermittent failures in the applications retrieving the messages. – jsf80238 Commented Jan 29 at 14:44
  • 1 Messages are not lost - see googlecloudcommunity/gc/Cloud-Product-Articles/…. – John Williams Commented Jan 29 at 15:43
  • 1 If I recall correct, GCP will store unacked messages for 7 days by default. In a previous assignment, we experienced that all listeners stopped listening because of a short disruption in GCP PubSub, but nothing was lost, and all messages were processed after restarting pods. BR – Roar S. Commented Jan 29 at 20:56
Add a comment  | 

1 Answer 1

Reset to default 2

One of the main reasons to use Pub/Sub as a messaging bus between services is because it will store messages when the subscriber is unavailable and then deliver them once the subscriber comes back online. As long as the subscriber comes back up before the expiration period passes, then messages published within the message retention duration that were not already acknowledged by the subscriber will be delivered.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745292677a4620954.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信