github.com/gogf/gkafka@v1.0.1-0.20190702070843-033a14468069/gkafka_message.go (about) 1 // Copyright 2018 gf Author(https://github.com/gogf/gf). All Rights Reserved. 2 // 3 // This Source Code Form is subject to the terms of the MIT License. 4 // If a copy of the MIT was not distributed with this file, 5 // You can obtain one at https://github.com/gogf/gf. 6 7 package gkafka 8 9 // MarkOffset marks current message as consumed. 10 func (msg *Message) MarkOffset() { 11 if msg.consumerMsg != nil && msg.client != nil && msg.client.consumer != nil { 12 msg.client.consumer.MarkOffset(msg.consumerMsg, "") 13 } 14 }