Skip to content

Commit f6e35cf

Browse files
authored
Merge pull request #322 from ydb-platform/topic-typos
Topic typos
2 parents 79e3471 + 168f0ba commit f6e35cf

File tree

9 files changed

+35
-369
lines changed

9 files changed

+35
-369
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
* Allow read and commit messages in parallel
1+
* Fixed signature/name of helpers in topic/topicsugar package
2+
* Allowed read and commit messages in parallel
23

34
## v3.31.0
45
* Extended the ydb.Connection interface with experimental db.Topic() client (control plane and reader API)

internal/topic/topicreaderinternal/batch.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ func newBatchFromStream(decoders decoderMap, session *partitionSession, sb rawto
9494
return newBatch(session, messages)
9595
}
9696

97-
// Context is cancelled when partition of message will stop to read.
97+
// Context is cancelled when code should stop to process messages batch
98+
// for example - lost connection to server or receive stop partition signal without graceful flag
9899
//
99100
// Experimental
100101
//

topic/reader_e2e_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ func TestReadMessages(t *testing.T) {
4242
t.Logf("msg: %#v", msg)
4343

4444
require.NoError(t, err)
45-
err = msg.UnmarshalTo(topicsugar.ConsumeWithCallback(func(data []byte) error {
45+
err = topicsugar.ReadMessageDataWithCallback(msg, func(data []byte) error {
4646
t.Log("Content:", string(data))
4747
return nil
48-
}))
48+
})
4949
require.NoError(t, err)
5050

5151
sendCDCMessage(ctx, t, db)

topic/topicoptions/topicoptions_reader.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ func WithCommitCountTrigger(count int) ReaderOption {
101101
}
102102

103103
// WithBatchReadMinCount
104+
// prefer min count messages in batch
105+
// sometimes batch can contain fewer messages, for example if local buffer is full and SDK can't receive more messages
104106
//
105107
// Experimental
106108
//

topic/topicreader/doc.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Package topicreader provide Reader to receive messages from YDB topics
2+
// More examples in examples repository
3+
//
4+
// https://github.com/ydb-platform/ydb-go-examples/tree/master/topic/topicreader
5+
package topicreader

topic/topicreader/reader.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ type Message = topicreaderinternal.PublicMessage
6868
type MessageContentUnmarshaler = topicreaderinternal.PublicMessageContentUnmarshaler
6969

7070
// Commit receive Message, Batch of single offset
71+
// It can be fast (by default) or sync and waite response from server
72+
// see topicoptions.CommitMode for details
7173
//
7274
// Experimental
7375
//

topic/topicreader/reader_exampl_own_type_unmarshal_test.go

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)