// Query Kafka server for Group Coordinator
Query Kafka server for Group Coordinator
Query Kafka server for Group Coordinator
pub async fn sync_group(
        &mut self,
        topic_name: &str,
        group_id: &str,
        member_id: &str,
        generation_id: i32
    ) -> Result<KfSyncGroupResponse, KfSocketError> {
        let mut request = KfSyncGroupRequest::default();
        // assignment
        let mut assignment = Assignment::default();
        assignment.topics = vec![topic_name.to_owned()];
        assignment.reserved_i32 = 1;
        // group assignment
        let mut group_assignment = GroupAssignment::default();
        group_assignment.content = Some(assignment);
        // sync group assignment reqeust
        let sync_group_assignment = SyncGroupRequestAssignment {
            member_id: member_id.to_owned(),
            assignment: group_assignment,
        };
        // sync group request
        request.group_id = group_id.to_owned();
        request.generation_id = generation_id;
        request.member_id = member_id.to_owned();
        request.assignments = vec![sync_group_assignment];
        self.0.send_receive(request).await
    }
pub async fn sync_group ( & mut self , topic_name : & str , group_id : & str , member_id : & str , generation_id : i32 ) -> Result < KfSyncGroupResponse , KfSocketError > { let mut request = KfSyncGroupRequest :: default ( ) ; // assignment let mut assignment = Assignment :: default ( ) ; assignment . topics = vec ! [ topic_name to_owned ( ) ] ; assignment . reserved_i32 = 1 ; // group assignment let mut group_assignment = GroupAssignment :: default ( ) ; group_assignment . content = Some ( assignment ) ; // sync group assignment reqeust let sync_group_assignment = SyncGroupRequestAssignment { member_id : member_id . to_owned ( ) , assignment : group_assignment , } ; // sync group request request . group_id = group_id . to_owned ( ) ; request . generation_id = generation_id ; request . member_id = member_id . to_owned ( ) ; request . assignments = vec ! [ sync_group_assignment ] ; self . 0 . send_receive ( request ) . await }
Query Kafka server for Group Coordinator
Query Kafka server for Group Coordinator
&mut self
topic_name
&str
group_id
&str
member_id
&str
generation_id
i32