diff --git a/vendor/github.com/Shopify/sarama/CHANGELOG.md b/vendor/github.com/Shopify/sarama/CHANGELOG.md index 429f65aa38..49ff92165a 100644 --- a/vendor/github.com/Shopify/sarama/CHANGELOG.md +++ b/vendor/github.com/Shopify/sarama/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +#### Version 1.10.1 (2016-08-30) + +Bug Fixes: + - Fix the documentation for `HashPartitioner` which was incorrect + ([#717](https://github.com/Shopify/sarama/pull/717)). + - Permit client creation even when it is limited by ACLs + ([#722](https://github.com/Shopify/sarama/pull/722)). + - Several fixes to the consumer timer optimization code, regressions introduced + in v1.10.0. Go's timers are finicky + ([#730](https://github.com/Shopify/sarama/pull/730), + [#733](https://github.com/Shopify/sarama/pull/733), + [#734](https://github.com/Shopify/sarama/pull/734)). + - Handle consuming compressed relative offsets with Kafka 0.10 + ([#735](https://github.com/Shopify/sarama/pull/735)). + #### Version 1.10.0 (2016-08-02) _Important:_ As of Sarama 1.10 it is necessary to tell Sarama the version of diff --git a/vendor/github.com/Shopify/sarama/consumer.go b/vendor/github.com/Shopify/sarama/consumer.go index ff7318afd0..5271e21dea 100644 --- a/vendor/github.com/Shopify/sarama/consumer.go +++ b/vendor/github.com/Shopify/sarama/consumer.go @@ -488,21 +488,26 @@ func (child *partitionConsumer) parseResponse(response *FetchResponse) ([]*Consu for _, msgBlock := range block.MsgSet.Messages { for _, msg := range msgBlock.Messages() { - if prelude && msg.Offset < child.offset { + offset := msg.Offset + if msg.Msg.Version >= 1 { + baseOffset := msgBlock.Offset - msgBlock.Messages()[len(msgBlock.Messages())-1].Offset + offset += baseOffset + } + if prelude && offset < child.offset { continue } prelude = false - if msg.Offset >= child.offset { + if offset >= child.offset { messages = append(messages, &ConsumerMessage{ Topic: child.topic, Partition: child.partition, Key: msg.Msg.Key, Value: msg.Msg.Value, - Offset: msg.Offset, + Offset: offset, Timestamp: msg.Msg.Timestamp, }) - child.offset = msg.Offset + 1 + child.offset = offset + 1 } else { incomplete = true } diff --git a/vendor/vendor.json b/vendor/vendor.json index c99c8603f8..2556031fb3 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -15,10 +15,10 @@ "revisionTime": "2016-10-07T15:24:48Z" }, { - "checksumSHA1": "AAXMx9vb6vmVZF2ieqNepAfeJFM=", + "checksumSHA1": "uqfutMkGN018AvjoQET06lhOM3g=", "path": "github.com/Shopify/sarama", - "revision": "94895118af045d13c7e576477276a53afccdd6b1", - "revisionTime": "2016-08-23T12:00:18Z" + "revision": "bd61cae2be85fa6ff40eb23dcdd24567967ac2ae", + "revisionTime": "2016-08-30T13:25:53Z" }, { "checksumSHA1": "USQFwXWz6tO69wtZdj3zZDB1MA4=",