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
{{ message }}
This repository was archived by the owner on Mar 30, 2023. It is now read-only.
If you disable autoack in AcknowledgmentCallbackFactory and ack/requeue offsets in a different thread from the one poller is operating on, all sorts of things become possible here under sufficient load:
Set<KafkaAckInfo<K, V>> candidates = this.ackInfo.getOffsets().get(this.ackInfo.getTopicPartition());
KafkaAckInfo<K, V> ackInfo = null;
if (candidates.iterator().next().equals(this.ackInfo)) {
// see if there are any pending acks for higher offsets
List<KafkaAckInfo<K, V>> toCommit = new ArrayList<>();
for (KafkaAckInfo<K, V> info : candidates) {
Also, acknowledged flag is set in the finally block of KafkaAckCallback.acknowledge unconditionally, although in case of ConcurrentModificationException you likely want to try ack'ing the offset again
And while we're at it, it'd be nice to have an ability to ack a bunch of offsets belonging to the same partition without sync'ing on the consumerMonitor for each one, but you'd have to expose KafkaMessageSource from the inbound channel adapter for that to work
If you disable autoack in AcknowledgmentCallbackFactory and ack/requeue offsets in a different thread from the one poller is operating on, all sorts of things become possible here under sufficient load:
ConcurrentModificationException, NoSuchElementException
Also, acknowledged flag is set in the finally block of KafkaAckCallback.acknowledge unconditionally, although in case of ConcurrentModificationException you likely want to try ack'ing the offset again
And while we're at it, it'd be nice to have an ability to ack a bunch of offsets belonging to the same partition without sync'ing on the consumerMonitor for each one, but you'd have to expose KafkaMessageSource from the inbound channel adapter for that to work