diff --git a/segmentio.go b/segmentio.go index 577e250..0599e5f 100644 --- a/segmentio.go +++ b/segmentio.go @@ -324,7 +324,7 @@ func (h *cgHandler) run(ctx context.Context) { var m broker.Message eh := h.brokerOpts.ErrorHandler offsets[msg.Topic][msg.Partition] = msg.Offset - p := &publication{generation: h.generation, m: &m, offsets: offsets} + p := &publication{topic: msg.Topic, generation: h.generation, m: &m, offsets: offsets} if err := h.brokerOpts.Codec.Unmarshal(msg.Value, &m); err != nil { p.err = err