Commit 02eeca0
committed
fix(jobs): ack MqWatcher messages so prefetched buffer is not logged as lost on shutdown
MqWatcher.consumes signals from RabbitMQ purely to wake up a DB-driven
processor; data lives in pending_txs / pending_messages, not in the
message body. Using no_ack=True meant aio_pika logged a warning per
prefetched message still in the iterator buffer at shutdown
("Message ... lost for consumer with no_ack ..."), which was alarming
on Ctrl-C even though nothing was actually lost.
Switch to no_ack=False with manual ack. Acked messages are gone; any
prefetched-but-not-yet-iterated messages are nack'd with requeue=True
by aio_pika's iterator close path, so they reappear on next startup
and trigger the watcher.1 parent c9320fc commit 02eeca0
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
161 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
162 | 166 | | |
163 | 167 | | |
164 | 168 | | |
| |||
0 commit comments