pub fn fetch_group_topic_offsets(&mut self,
                                     group: &str,
                                     topic: &str)
                                     -> Result<Vec<TopicPartitionOffset>> {
        let mut req = protocol::OffsetFetchRequest::new(group,
                                                        self.config.offset_fetch_version,
                                                        self.state.next_correlation_id(),
                                                        &self.config.client_id);
        let num;
        match self.state.partitions_for(topic) {
            None => return Err(Error::Kafka(KafkaCode::UnknownTopicOrPartition)),
            Some(tp) => {
                num = tp.len();
                for (id, _) in tp {
                    req.add(topic, id);
                }
            }
        }
        __fetch_group_offsets(req, num, &mut self.state, &mut self.conn_pool, &self.config)
    }
/// Fetch offset for all partitions of a particular topic of a consumer group
///
/// # Examples
///
/// ```no_run
/// use kafka::client::KafkaClient;
///
/// let mut client = KafkaClient::new(vec!["localhost:9092".to_owned()]);
/// client.load_metadata_all().unwrap();
/// let offsets = client.fetch_group_topic_offsets("my-group", "my-topic").unwrap();
/// ```
Fetch offset for all partitions of a particular topic of a consumer group
Fetch offset for all partitions of a particular topic of a consumer group
pub fn fetch_group_topic_offsets(&mut self,
                                     group: &str,
                                     topic: &str)
                                     -> Result<Vec<TopicPartitionOffset>> {
        let mut req = protocol::OffsetFetchRequest::new(group,
                                                        self.config.offset_fetch_version,
                                                        self.state.next_correlation_id(),
                                                        &self.config.client_id);
        let num;
        match self.state.partitions_for(topic) {
            None => return Err(Error::Kafka(KafkaCode::UnknownTopicOrPartition)),
            Some(tp) => {
                num = tp.len();
                for (id, _) in tp {
                    req.add(topic, id);
                }
            }
        }
        __fetch_group_offsets(req, num, &mut self.state, &mut self.conn_pool, &self.config)
    }
pub fn fetch_group_topic_offsets ( & mut self , group : & str , topic : & str ) -> Result < Vec < TopicPartitionOffset > > { let mut req = protocol :: OffsetFetchRequest :: new ( group , self . config . offset_fetch_version , self . state . next_correlation_id ( ) , & self . config . client_id ) ; let num ; match self . state . partitions_for ( topic ) { None => return Err ( Error :: Kafka ( KafkaCode :: UnknownTopicOrPartition ) ) , Some ( tp ) => { num = tp . len ( ) ; for ( id , _ ) in tp { req . add ( topic , id ) ; } } } __fetch_group_offsets ( req , num , & mut self . state , & mut self . conn_pool , & self . config ) }
Fetch offset for all partitions of a particular topic of a consumer group
Fetch offset for all partitions of a particular topic of a consumer group
&mut self
group
&str
topic
&str
examples
```no_run
use kafka::client::KafkaClient.

let mut client = KafkaClient::new(vec!["localhost:9092".to_owned()]);
client.load_metadata_all().unwrap();
let offsets = client.fetch_group_topic_offsets("my-group", "my-topic").unwrap();
```
` ` ` no_run use kafka :: client :: KafkaClient . let mut client = KafkaClient :: new ( vec! [ " localhost : 9092 " . to_owned () ] ) ; client . load_metadata_all () . unwrap () ; let offsets = client . fetch_group_topic_offsets ( " my - group " " my - topic " ) . unwrap () ; ` ` `