Skip to content

Commit d4ee498

Browse files
committed
fix example, build
1 parent 8b7537c commit d4ee498

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

examples/topic/topicreader/topicreader_handler.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ func (h *TopicEventsHandler) OnReadMessages(
4747
for _, mess := range event.Batch.Messages {
4848
log.Printf("Receive message: %v/%v/%v", mess.Topic(), mess.PartitionID(), mess.SeqNo)
4949
}
50-
_ = h.listener.Commit(ctx, event.Batch)
50+
51+
processBatch(ctx, event.Batch)
5152

5253
return nil
5354
}

internal/topic/topiclistenerinternal/stream_listener.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
)
2121

2222
type streamListener struct {
23-
cfg StreamListenerConfig
23+
cfg *StreamListenerConfig
2424

2525
stream rawtopicreader.TopicReaderStreamInterface
2626
streamClose context.CancelCauseFunc
@@ -41,7 +41,7 @@ func newStreamListener(
4141
connectionCtx context.Context,
4242
client TopicClient,
4343
eventListener EventHandler,
44-
config StreamListenerConfig,
44+
config *StreamListenerConfig,
4545
sessionIDCounter *atomic.Int64,
4646
) (*streamListener, error) {
4747
res := &streamListener{

0 commit comments

Comments
 (0)