We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fd2840c commit cee9c22Copy full SHA for cee9c22
1 file changed
google/cloud/pubsub_v1/subscriber/_protocol/leaser.py
@@ -142,6 +142,11 @@ def maintain_leases(self):
142
# that in the event of a badly behaving actor, we can drop messages
143
# and allow the Pub/Sub server to resend them.
144
cutoff = time.time() - self._manager.flow_control.max_lease_duration
145
+
146
+ # Add some debugging
147
+ for ack_id, item in six.iteritems(leased_messages):
148
+ print(f"[Lease manager] ack_id = {ack_id[0:2]}..{ack_id[len(ack_id)-4:len(ack_id)]}; seconds to drop = {round(item.sent_time - cutoff)} ")
149
150
to_drop = [
151
requests.DropRequest(ack_id, item.size, item.ordering_key)
152
for ack_id, item in six.iteritems(leased_messages)
0 commit comments