ruby-kafka 0.6.4 → 0.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 863071de617edf01ec3b4282b1549197107f08d56c8c7235387b8ac79616b911
4
- data.tar.gz: 784850369d5932d275028c7d41feba5da078026c58caa944cae792b1562c9bfa
3
+ metadata.gz: fd38acffae8d842eaebaae2040a110795eeea0f25ff2245922602ca830aa4d54
4
+ data.tar.gz: afe243ac58b8b12e67f40200084952891c83051b2ab840575f6f736ba68195e7
5
5
  SHA512:
6
- metadata.gz: 050b0dd32483774d21b45826a3f96a649562504439688f3c612c9f341ca2944d996b8887cf07fafcd349fc94455faf7ea84b9862362d20b5c6a4a2253430bb88
7
- data.tar.gz: cebc6b02cacbc0d5a0782e0e3f7719e05a043ced9beae5135c3d8ff5d5ad7188ab5bdb13be568bd916bce19485177479f63ea27fe4d0617e6fe48f8b572d7b3e
6
+ metadata.gz: 60db92eccd0fc6ae28b417756d68d55e452fbefbf1072e9dae920a460597d1804d33feeefe52ebeabb2f40d226a3960fafb37c6940e92bdbda5c5d5a293626af
7
+ data.tar.gz: 2f53313b0d67bb248ad25f8a57e414291e1abe45d75c0fa2724037dd9474679077cbd0c9b05a55057b025cc797d6caf3799e6c69dc708e451ce7c6ab624a8ecd
data/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ Changes and additions to the library will be listed here.
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## v0.6.4
8
+
9
+ - Fix bug that caused consumers to jump back and reprocess messages (#595).
10
+
7
11
  ## v0.6.3
8
12
 
9
13
  - Allow configuring the max size of the queue connecting the fetcher thread with the consumer.
@@ -509,7 +509,9 @@ module Kafka
509
509
 
510
510
  case tag
511
511
  when :batches
512
- message
512
+ # make sure any old batches, fetched prior to the completion of a consumer group sync,
513
+ # are only processed if the batches are from brokers for which this broker is still responsible.
514
+ message.select { |batch| @group.assigned_to?(batch.topic, batch.partition) }
513
515
  when :exception
514
516
  raise message
515
517
  end
@@ -31,6 +31,10 @@ module Kafka
31
31
  @assigned_partitions.select { |topic, _| @topics.include?(topic) }
32
32
  end
33
33
 
34
+ def assigned_to?(topic, partition)
35
+ subscribed_partitions[topic].include?(partition)
36
+ end
37
+
34
38
  def member?
35
39
  !@generation_id.nil?
36
40
  end
data/lib/kafka/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kafka
4
- VERSION = "0.6.4"
4
+ VERSION = "0.6.5"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-kafka
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Schierbeck
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-05 00:00:00.000000000 Z
11
+ date: 2018-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler