From 799ae3283f4411d640ed74e5273109cec4cc51a4 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Fri, 11 Dec 2020 12:43:02 +0300 Subject: [PATCH] fix double ack Signed-off-by: Vasiliy Tolstov --- segmentio.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/segmentio.go b/segmentio.go index 261fac6..b5aabfd 100644 --- a/segmentio.go +++ b/segmentio.go @@ -397,7 +397,7 @@ func (h *cgHandler) run(ctx context.Context) { if h.subOpts.ErrorHandler != nil { eh = h.subOpts.ErrorHandler } - offsets[msg.Topic][msg.Partition] = msg.Offset + offsets[msg.Topic][msg.Partition] = msg.Offset + 1 p := &publication{topic: msg.Topic, generation: h.generation, m: &m, offsets: offsets} if err := h.brokerOpts.Codec.Unmarshal(msg.Value, &m); err != nil {