Documentation ¶
Index ¶
- func CommitNotify(ctx context.Context, db ydb.Connection)
- func ExplicitPartitionStartStopHandler(ctx context.Context, db ydb.Connection)
- func OwnReadProgressStorage(ctx context.Context, db ydb.Connection)
- func PartitionGracefulStopHandled(ctx context.Context, db ydb.Connection)
- func PartitionStartStopHandlerAndOwnReadProgressStorage(ctx context.Context, db ydb.Connection)
- func PartitionStopHandled(ctx context.Context, reader *topicreader.Reader)
- func PrintMessageContent(ctx context.Context, reader *topicreader.Reader)
- func ProcessMessagesWithSyncCommit(ctx context.Context, db ydb.Connection)
- func ReadMessagesByBatch(ctx context.Context, reader *topicreader.Reader)
- func ReadMessagesWithCustomBatching(ctx context.Context, db ydb.Connection)
- func UnmarshalMessageContentToJSONStruct(msg *topicreader.Message)
- func UnmarshalMessageContentToOwnType(ctx context.Context, reader *topicreader.Reader)
- func UnmarshalMessageContentToProtobufStruct(msg *topicreader.Message)
- type MyMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommitNotify ¶
CommitNotify is example for receive commit notifications with async commit mode
func ExplicitPartitionStartStopHandler ¶
ExplicitPartitionStartStopHandler is example for create own handler for stop partition event from server
func OwnReadProgressStorage ¶
OwnReadProgressStorage example about store reading progress in external system and don't use commit messages to YDB
func PartitionGracefulStopHandled ¶
PartitionGracefulStopHandled is example of sdk handle server signal about graceful stop partition
func PartitionStartStopHandlerAndOwnReadProgressStorage ¶
PartitionStartStopHandlerAndOwnReadProgressStorage example of complex use explicit start/stop partition handler and own progress storage in external system
func PartitionStopHandled ¶
func PartitionStopHandled(ctx context.Context, reader *topicreader.Reader)
PartitionStopHandled is example of sdk handle server signal about stop partition
func PrintMessageContent ¶
func PrintMessageContent(ctx context.Context, reader *topicreader.Reader)
PrintMessageContent is simple example for easy start read messages it is not recommend way for heavy-load processing, batch processing usually will faster
func ProcessMessagesWithSyncCommit ¶
ProcessMessagesWithSyncCommit example about guarantee wait for commit accepted by server
func ReadMessagesByBatch ¶
func ReadMessagesByBatch(ctx context.Context, reader *topicreader.Reader)
ReadMessagesByBatch it is recommended way for process messages
func ReadMessagesWithCustomBatching ¶
ReadMessagesWithCustomBatching example of custom of readed message batch
func UnmarshalMessageContentToJSONStruct ¶
func UnmarshalMessageContentToJSONStruct(msg *topicreader.Message)
UnmarshalMessageContentToJSONStruct is example for effective way for unmarshal json message content to value
func UnmarshalMessageContentToOwnType ¶
func UnmarshalMessageContentToOwnType(ctx context.Context, reader *topicreader.Reader)
UnmarshalMessageContentToOwnType is example about effective unmarshal own format from message content
func UnmarshalMessageContentToProtobufStruct ¶
func UnmarshalMessageContentToProtobufStruct(msg *topicreader.Message)
UnmarshalMessageContentToProtobufStruct is example for effective way for unmarshal protobuf message content to value
Types ¶
type MyMessage ¶
MyMessage example type with own serialization
func (*MyMessage) UnmarshalYDBTopicMessage ¶
UnmarshalYDBTopicMessage implements topicreader.MessageContentUnmarshaler interface