mirror of
https://gitee.com/johng/gf
synced 2026-07-08 22:40:30 +08:00
thirdparty package kafka updated to date
This commit is contained in:
@ -47,6 +47,7 @@ func (msb *MessageBlock) decode(pd packetDecoder) (err error) {
|
||||
|
||||
type MessageSet struct {
|
||||
PartialTrailingMessage bool // whether the set on the wire contained an incomplete trailing MessageBlock
|
||||
OverflowMessage bool // whether the set on the wire contained an overflow message
|
||||
Messages []*MessageBlock
|
||||
}
|
||||
|
||||
@ -85,7 +86,12 @@ func (ms *MessageSet) decode(pd packetDecoder) (err error) {
|
||||
case ErrInsufficientData:
|
||||
// As an optimization the server is allowed to return a partial message at the
|
||||
// end of the message set. Clients should handle this case. So we just ignore such things.
|
||||
ms.PartialTrailingMessage = true
|
||||
if msb.Offset == -1 {
|
||||
// This is an overflow message caused by chunked down conversion
|
||||
ms.OverflowMessage = true
|
||||
} else {
|
||||
ms.PartialTrailingMessage = true
|
||||
}
|
||||
return nil
|
||||
default:
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user