Reputation: 27
I have set setAckDeadlineSeconds(5)
when creating subscription, but when message ordering is enabled, the ackDeadlineSeconds
does not work. The message is not redelivered if time elapsed is over ack deadline. Is this the desired behavior when message ordering is enabled?
I am creating subscription as below:
Subscription request = Subscription.newBuilder()
.setName(subscriptionName.toString())
.setTopic(projectTopicName.toString())
.setEnableMessageOrdering(true)
.setAckDeadlineSeconds(5)
.build();
Upvotes: 0
Views: 432
Reputation: 17251
Ack deadlines should be respected when messasge ordering is enabled. One thing to note is that the client libraries manage ack extension and therefore do not use the ack deadline set on subscription creation. They default to extending ack deadlines for one hour. You mention that you call setMaxAckExtensionPeriod
, though you only do that when in emulator mode in getSubscriber
not createSubscriber
, the latter of which is the method you are calling (though maybe you have since updated the code to set this everywhere).
If after verifying that you are indeed setting the max ack extension you are still not getting message redelivered, it is best to create a support case. With a case that includes your project and subscription information, support can look at what is happening to those messages that are not getting redelivered.
Upvotes: 1