ruby-kafka 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b311a24cc8c5a81b7f0e7f930f4e0d28488d14ecaec2456ca482ac86889c3344
4
- data.tar.gz: 8315a0b6b22bb4b7ef9393af789101508091b84ae895fb3a80250ba68ce61118
3
+ metadata.gz: 863071de617edf01ec3b4282b1549197107f08d56c8c7235387b8ac79616b911
4
+ data.tar.gz: 784850369d5932d275028c7d41feba5da078026c58caa944cae792b1562c9bfa
5
5
  SHA512:
6
- metadata.gz: 7f1e7818c5276401f556a093e746c811d13f31c056d0c9f415bd5ef91ce38bbe50b7f9b1849ed5529c9e3e134261d147a89e27d10f31d268d8bb1e6335178a17
7
- data.tar.gz: 5d79aa51abd414624f79e1f6d64a110ff57ee0adb289503a2862d383b1b9e73344718224d93f54fef0f59ffda004a845111626cb03b9c8d8623a47797159afc7
6
+ metadata.gz: 050b0dd32483774d21b45826a3f96a649562504439688f3c612c9f341ca2944d996b8887cf07fafcd349fc94455faf7ea84b9862362d20b5c6a4a2253430bb88
7
+ data.tar.gz: cebc6b02cacbc0d5a0782e0e3f7719e05a043ced9beae5135c3d8ff5d5ad7188ab5bdb13be568bd916bce19485177479f63ea27fe4d0617e6fe48f8b572d7b3e
@@ -4,6 +4,9 @@ Changes and additions to the library will be listed here.
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## v0.6.3
8
+
9
+ - Allow configuring the max size of the queue connecting the fetcher thread with the consumer.
7
10
  - Add support for the Describe Groups API (#583).
8
11
 
9
12
  ## v0.6.2
data/README.md CHANGED
@@ -411,6 +411,7 @@ Compression is enabled by passing the `compression_codec` parameter to `#produce
411
411
 
412
412
  * `:snappy` for [Snappy](http://google.github.io/snappy/) compression.
413
413
  * `:gzip` for [gzip](https://en.wikipedia.org/wiki/Gzip) compression.
414
+ * `:lz4` for [LZ4](https://en.wikipedia.org/wiki/LZ4_(compression_algorithm)) compression.
414
415
 
415
416
  By default, all message sets will be compressed if you specify a compression codec. To increase the compression threshold, set `compression_threshold` to an integer value higher than one.
416
417
 
@@ -235,7 +235,7 @@ module Kafka
235
235
  mark_message_as_processed(message) if automatically_mark_as_processed
236
236
  @offset_manager.commit_offsets_if_necessary
237
237
 
238
- @heartbeat.send_if_necessary
238
+ trigger_heartbeat
239
239
 
240
240
  return if !@running
241
241
  end
@@ -326,7 +326,7 @@ module Kafka
326
326
 
327
327
  @offset_manager.commit_offsets_if_necessary
328
328
 
329
- @heartbeat.send_if_necessary
329
+ trigger_heartbeat
330
330
 
331
331
  return if !@running
332
332
  end
@@ -362,10 +362,18 @@ module Kafka
362
362
  @offset_manager.mark_as_processed(message.topic, message.partition, message.offset)
363
363
  end
364
364
 
365
- def send_heartbeat_if_necessary
366
- @heartbeat.send_if_necessary
365
+ def trigger_heartbeat
366
+ @heartbeat.trigger
367
367
  end
368
368
 
369
+ def trigger_heartbeat!
370
+ @heartbeat.trigger!
371
+ end
372
+
373
+ # Aliases for the external API compatibility
374
+ alias send_heartbeat_if_necessary trigger_heartbeat
375
+ alias send_heartbeat trigger_heartbeat!
376
+
369
377
  private
370
378
 
371
379
  def consumer_loop
@@ -488,7 +496,7 @@ module Kafka
488
496
 
489
497
  join_group unless @group.member?
490
498
 
491
- @heartbeat.send_if_necessary
499
+ trigger_heartbeat
492
500
 
493
501
  resume_paused_partitions!
494
502
 
@@ -8,11 +8,13 @@ module Kafka
8
8
  @last_heartbeat = Time.now
9
9
  end
10
10
 
11
- def send_if_necessary
12
- if Time.now > @last_heartbeat + @interval
13
- @group.heartbeat
14
- @last_heartbeat = Time.now
15
- end
11
+ def trigger!
12
+ @group.heartbeat
13
+ @last_heartbeat = Time.now
14
+ end
15
+
16
+ def trigger
17
+ trigger! if Time.now > @last_heartbeat + @interval
16
18
  end
17
19
  end
18
20
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kafka
4
- VERSION = "0.6.3"
4
+ VERSION = "0.6.4"
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.3
4
+ version: 0.6.4
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-05-11 00:00:00.000000000 Z
11
+ date: 2018-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler