@@ -419,12 +419,14 @@ def from_proto(
419419 class InitRequest (IToProto ):
420420 topics_read_settings : List ["StreamReadMessage.InitRequest.TopicReadSettings" ]
421421 consumer : str
422+ auto_partitioning_support : bool = False
422423
423424 def to_proto (self ) -> ydb_topic_pb2 .StreamReadMessage .InitRequest :
424425 res = ydb_topic_pb2 .StreamReadMessage .InitRequest ()
425426 res .consumer = self .consumer
426427 for settings in self .topics_read_settings :
427428 res .topics_read_settings .append (settings .to_proto ())
429+ res .auto_partitioning_support = self .auto_partitioning_support
428430 return res
429431
430432 @dataclass
@@ -696,6 +698,20 @@ def to_proto(self) -> ydb_topic_pb2.StreamReadMessage.StopPartitionSessionRespon
696698 partition_session_id = self .partition_session_id ,
697699 )
698700
701+ @dataclass
702+ class EndPartitionSession (IFromProto ):
703+ partition_session_id : int
704+ adjacent_partition_ids : List [int ]
705+ child_partition_ids : List [int ]
706+
707+ @staticmethod
708+ def from_proto (msg : ydb_topic_pb2 .StreamReadMessage .EndPartitionSession ):
709+ return StreamReadMessage .EndPartitionSession (
710+ partition_session_id = msg .partition_session_id ,
711+ adjacent_partition_ids = list (msg .adjacent_partition_ids ),
712+ child_partition_ids = list (msg .child_partition_ids ),
713+ )
714+
699715 @dataclass
700716 class FromClient (IToProto ):
701717 client_message : "ReaderMessagesFromClientToServer"
@@ -775,6 +791,13 @@ def from_proto(
775791 msg .partition_session_status_response
776792 ),
777793 )
794+ elif mess_type == "end_partition_session" :
795+ return StreamReadMessage .FromServer (
796+ server_status = server_status ,
797+ server_message = StreamReadMessage .EndPartitionSession .from_proto (
798+ msg .end_partition_session ,
799+ ),
800+ )
778801 else :
779802 raise issues .UnexpectedGrpcMessage (
780803 "Unexpected message while parse ReaderMessagesFromServerToClient: '%s'" % mess_type
@@ -799,6 +822,7 @@ def from_proto(
799822 UpdateTokenResponse ,
800823 StreamReadMessage .StartPartitionSessionRequest ,
801824 StreamReadMessage .StopPartitionSessionRequest ,
825+ StreamReadMessage .EndPartitionSession ,
802826]
803827
804828
0 commit comments