Commit 736c3578 authored by Mikhail Karnevskiy's avatar Mikhail Karnevskiy
Browse files

Catch exception by acknowledging

parent 6e5c4ef3
Pipeline #6435 passed with stage
in 55 seconds
......@@ -120,9 +120,13 @@ class SimpleAsapoReceiver:
def acknowledge(self, name, ids):
for ack_id in ids:
group_id = str(binascii.crc32(name.encode()))
log.info("Acknowledging id=%s stream=%s group_id=%s", ack_id, self.stream, group_id)
self.consumer.acknowledge(group_id, ack_id, stream=self.stream)
try:
group_id = str(binascii.crc32(name.encode()))
log.info("Acknowledging id=%s stream=%s group_id=%s", ack_id, self.stream, group_id)
self.consumer.acknowledge(group_id, ack_id, stream=self.stream)
except Exception as e:
log.warning("Acknowledging of id=%s stream=%s group_id=%s fails. Reason=%s",
ack_id, self.stream, group_id, e)
def get_unacknowledged_messages(self, group_id, stream):
try:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment