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 +4 -4
- data/CHANGES +2 -0
- data/lib/manageiq/messaging/kafka/client.rb +3 -0
- data/lib/manageiq/messaging/kafka/queue.rb +5 -1
- data/lib/manageiq/messaging/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 271baef8a9ddb7bc61f23e2f6eff5e67fa586f21
|
4
|
+
data.tar.gz: 12a723657dbe6afad1ac751e698e037e7134272e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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(
|
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|
|
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.
|
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
|
11
|
+
date: 2018-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|