Compare commits

..

3 Commits
v4.1.13 ... v4

Author SHA1 Message Date
5080a52834 fixup revoked error
Some checks failed
test / test (push) Failing after 12m26s
coverage / build (push) Failing after 18m17s
sync / sync (push) Successful in 9s
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2025-12-02 21:50:53 +03:00
fe5d474f36 fixup error
Some checks failed
coverage / build (push) Has been cancelled
test / test (push) Has been cancelled
sync / sync (push) Successful in 11s
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2025-12-02 21:46:03 +03:00
d000ac6843 pass errors from broker to subscribers
Some checks are pending
coverage / build (push) Waiting to run
test / test (push) Waiting to run
sync / sync (push) Has started running
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2025-12-02 21:35:35 +03:00

View File

@@ -123,7 +123,7 @@ func (s *Subscriber) poll(ctx context.Context) {
c := s.consumers[tps]
s.mu.Unlock()
if c != nil {
c.recs <- newErrorFetchTopicPartition(kgo.ErrClientClosed, t, p)
c.recs <- newErrorFetchTopicPartition(err, t, p)
}
})
@@ -199,7 +199,15 @@ func (s *Subscriber) revoked(ctx context.Context, c *kgo.Client, revoked map[str
}
s.killConsumers(ctx, revoked)
if err := c.CommitMarkedOffsets(ctx); err != nil {
s.kopts.Logger.Error(ctx, "[kgo] revoked CommitMarkedOffsets error", err)
s.mu.Lock()
tpc := make(map[tp]*consumer, len(s.consumers))
maps.Copy(tpc, s.consumers)
s.mu.Unlock()
for tp, c := range tpc {
if c != nil {
c.recs <- newErrorFetchTopicPartition(err, tp.t, tp.p)
}
}
}
}
@@ -352,6 +360,8 @@ func (pc *consumer) newErrorMessage(err error, t string, p int32) *kgoMessage {
pm = &kgoMessage{}
}
pm.ack = false
pm.body = nil
pm.err = err
pm.topic = t
pm.hdr = metadata.New(2)