manageiq-messaging 0.1.1 → 0.1.2

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
  SHA1:
3
- metadata.gz: 24d7b7196e5413465ff914e77ca504f91e96dc16
4
- data.tar.gz: 808545abce4d4629cdcd32a565ba63800005f331
3
+ metadata.gz: 271baef8a9ddb7bc61f23e2f6eff5e67fa586f21
4
+ data.tar.gz: 12a723657dbe6afad1ac751e698e037e7134272e
5
5
  SHA512:
6
- metadata.gz: 05346bab1741de40e0a6d5fdf2abf6e87c0ad059b220671f5b62f91e917e984e8b97dc86281afa4a647818c08bea98ea59656b93f2062128a88c25fce255fb58
7
- data.tar.gz: 7ea84ea24c5199330a78bc6169637c94a1cae7e270aae06986aff43c12d20df24db35060288fcd0149591281ece366654342c7ec8cd8d78448c606802d4b312b
6
+ metadata.gz: 0f30b6f908408fd22ffb24c1d241a08e1d1d7f9934e7f4c460b7eecd236b49ce817fd7122aa286a0c64a3043f5a200c3e61406dc48bf29ad8e5a337e5f102cf7
7
+ data.tar.gz: ecd78e6976f3d76dcbecb65476a1b524c228feb9ffc3e1257cd4861d99b65f62a657b29a318354de44215b0acba204b7889a104a169a9528d81e99f3767d0f7a
data/CHANGES CHANGED
@@ -5,3 +5,5 @@
5
5
  * By default upon receiving a message or an event, it is automatically acknowledged. But
6
6
  the subscriber can decide to turn off the auto ack feature and ack it in the callback block.
7
7
 
8
+ = 0.1.2 - 11-Dec-2018
9
+ * Allow to set max_bytes to each_batch when subscribe to a Kafka topic.
@@ -27,6 +27,9 @@ module ManageIQ
27
27
  # Kafka specific +subscribe_topic+ options:
28
28
  # * :persist_ref (Used as Kafka group_id)
29
29
  #
30
+ # Kafka specific +subscribe_messages+ options:
31
+ # * :max_bytes (Max batch size to read, default is 10Mb)
32
+ #
30
33
  # Without +:persist_ref+ every topic subscriber receives a copy of each message
31
34
  # only when they are active. If multiple topic subscribers join with the same
32
35
  # +:persist_ref+, each message is consumed by only one of the subscribers. This
@@ -17,9 +17,13 @@ module ManageIQ
17
17
  def subscribe_messages_impl(options)
18
18
  topic = address(options)
19
19
 
20
+ batch_options = {}
21
+ batch_options[:automatically_mark_as_processed] = auto_ack?(options)
22
+ batch_options[:max_bytes] = options[:max_bytes] if options.key?(:max_bytes)
23
+
20
24
  consumer = queue_consumer
21
25
  consumer.subscribe(topic)
22
- consumer.each_batch(:automatically_mark_as_processed => auto_ack?(options)) do |batch|
26
+ consumer.each_batch(batch_options) do |batch|
23
27
  logger.info("Batch message received: queue(#{topic})")
24
28
  begin
25
29
  messages = batch.messages.collect do |message|
@@ -1,5 +1,5 @@
1
1
  module ManageIQ
2
2
  module Messaging
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: manageiq-messaging
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ManageIQ Authors
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-11-20 00:00:00.000000000 Z
11
+ date: 2018-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport