Google Cloud Pubsub Data lost

前端 未结 3 2047
悲&欢浪女
悲&欢浪女 2021-01-14 01:35

I\'m experiencing a problem with GCP pubsub where a small percentage of data was lost when publishing thousands of messages in couple seconds.

I\'m logging both

3条回答
  •  孤独总比滥情好
    2021-01-14 01:47

    You shouldn't need to create a new client for every publish operation. I'm betting that the reason that that "fixed the problem" is because it mitigated a race that exists in the publisher client side. I'm also not convinced that the log line you've shown on the publisher side:

    API: 200 **** sessionId: 731, messageId:108562396466545 ******

    corresponds to a successful publish of sessionId 731 by publish_test_topic(). Under what conditions is that log line printed? The code that has been presented so far does not show this.

提交回复
热议问题