google pub sub honor ack 中的消息排序是否截止?

Does message ordering in google pub sub honor ack deadline?

我在创建订阅时设置了setAckDeadlineSeconds(5),但是启用消息排序后,ackDeadlineSeconds 不起作用。如果经过的时间超过确认截止时间,则不会重新发送消息。这是启用消息排序时所需的行为吗?

我正在创建如下订阅:

Subscription request = Subscription.newBuilder()
          .setName(subscriptionName.toString())
          .setTopic(projectTopicName.toString())
          .setEnableMessageOrdering(true)
          .setAckDeadlineSeconds(5)
          .build();

启用消息排序时应遵守确认截止日期。需要注意的一件事是客户端库管理 ack 扩展,因此不使用在创建订阅时设置的 ack 截止日期。他们默认将确认截止日期延长一小时。你提到你调用 setMaxAckExtensionPeriod,尽管你只在 emulator mode in getSubscriber not createSubscriber, the latter of which is the method you are calling 中调用(尽管你可能已经更新了代码以在任何地方设置它)。

如果在确认您确实设置了最大确认扩展后,您仍然没有收到重新发送的消息,最好 create a support case。对于包含您的项目和订阅信息的案例,支持人员可以查看那些未重新传送的消息的情况。