refactor
This commit is contained in:
@@ -108,15 +108,15 @@ func (sub *TopicSubscriber) onEachPartition(partition *mq_pb.Partition, broker s
|
|||||||
Namespace: sub.ContentConfig.Namespace,
|
Namespace: sub.ContentConfig.Namespace,
|
||||||
Name: sub.ContentConfig.Topic,
|
Name: sub.ContentConfig.Topic,
|
||||||
},
|
},
|
||||||
Partition: &mq_pb.Partition{
|
PartitionOffset: &mq_pb.PartitionOffset{
|
||||||
RingSize: partition.RingSize,
|
Partition: &mq_pb.Partition{
|
||||||
RangeStart: partition.RangeStart,
|
RingSize: partition.RingSize,
|
||||||
RangeStop: partition.RangeStop,
|
RangeStart: partition.RangeStart,
|
||||||
|
RangeStop: partition.RangeStop,
|
||||||
|
},
|
||||||
|
TsNs: sub.alreadyProcessedTsNs,
|
||||||
},
|
},
|
||||||
Filter: sub.ContentConfig.Filter,
|
Filter: sub.ContentConfig.Filter,
|
||||||
Offset: &mq_pb.SubscribeMessageRequest_InitMessage_StartTimestampNs{
|
|
||||||
StartTimestampNs: sub.alreadyProcessedTsNs,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -148,6 +148,7 @@ func (sub *TopicSubscriber) onEachPartition(partition *mq_pb.Partition, broker s
|
|||||||
return fmt.Errorf("subscribe recv: %v", err)
|
return fmt.Errorf("subscribe recv: %v", err)
|
||||||
}
|
}
|
||||||
if resp.Message == nil {
|
if resp.Message == nil {
|
||||||
|
glog.V(0).Infof("subscriber %s/%s/%s received nil message", sub.ContentConfig.Namespace, sub.ContentConfig.Topic, sub.SubscriberConfig.ConsumerGroup)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
switch m := resp.Message.(type) {
|
switch m := resp.Message.(type) {
|
||||||
|
|||||||
Reference in New Issue
Block a user