You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My consumer use database for idempotency (each record is verified). I would survive when database is temporary unavailable. I can define in DefaultErrorHandler that
java.net.ConnectException is retryable exception and it works.
As long as I use async-ack=false. Then true, consumer became paused and retry does not happen.
I use "async-ack" to get support for out-of-order commits. My question:
If need retry when database is unavailable, do I have to give up async-ack and implement out-of-order commits myself?
Is there any trap I should avoid in own implementation of retrying + out-of-order commits?
The listener container will defer the out-of-order commits until the missing acknowledgments are received. The consumer will be paused (no new records delivered) until all the offsets for the previous poll have been committed.
"consumer will be paused" - is that a good concept or no better way? I see it is risky: if something went wrong, record will not be acknowledge but poll() will be called forever. I rather prefer to stop the poll() until all fetched records are comitted. If something went wrong, broker will kick me out from consumer group and there is a hope new consumer will process the record
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My consumer use database for idempotency (each record is verified). I would survive when database is temporary unavailable. I can define in DefaultErrorHandler that
java.net.ConnectException is retryable exception and it works.
As long as I use
async-ack=false
. Thentrue
, consumer became paused and retry does not happen.I use "async-ack" to get support for out-of-order commits. My question:
"consumer will be paused" - is that a good concept or no better way? I see it is risky: if something went wrong, record will not be acknowledge but
poll()
will be called forever. I rather prefer to stop thepoll()
until all fetched records are comitted. If something went wrong, broker will kick me out from consumer group and there is a hope new consumer will process the recordBeta Was this translation helpful? Give feedback.
All reactions