manageiq-messaging 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +1 -2
- data/lib/manageiq/messaging/kafka/common.rb +5 -3
- data/lib/manageiq/messaging/kafka/queue.rb +1 -1
- data/lib/manageiq/messaging/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8859fa0a68ffe54c38283145348077bcbc78e004636e38960cc0d2ff70923f7a
|
4
|
+
data.tar.gz: '088f6d9d2dc80e753b16a0bbdce58dc789aec1d5eada50c0aa3b74fd78109006'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 457f22d4a96c0ec19a05cb2a0ebe3a9f665f62583d7337ede95ddf786e899b78dcd86173c219988d34ef8d4deafc188d8bcd184728e8362e4b66c772875370f5
|
7
|
+
data.tar.gz: b496df16b18b87754bf22107fe0d7f30a2dee767f6673cdd51330880ea290539967397b32f629cb4ff24fb24e428390ba9478cc0c2bbc359c404e0a5cd358976
|
data/.travis.yml
CHANGED
@@ -5,7 +5,7 @@ module ManageIQ
|
|
5
5
|
require 'manageiq/messaging/common'
|
6
6
|
include ManageIQ::Messaging::Common
|
7
7
|
|
8
|
-
GROUP_FOR_QUEUE_MESSAGES = '
|
8
|
+
GROUP_FOR_QUEUE_MESSAGES = 'manageiq_messaging_queue_group_'.freeze
|
9
9
|
|
10
10
|
private
|
11
11
|
|
@@ -21,9 +21,11 @@ module ManageIQ
|
|
21
21
|
@topic_consumer ||= kafka_client.consumer(:group_id => persist_ref)
|
22
22
|
end
|
23
23
|
|
24
|
-
def queue_consumer
|
24
|
+
def queue_consumer(topic)
|
25
25
|
# all queue consumers join the same group so that each message can be processed by one and only one consumer
|
26
|
-
@queue_consumer
|
26
|
+
@queue_consumer.try(:stop) unless @queue_topic == topic
|
27
|
+
@queue_topic = topic
|
28
|
+
@queue_consumer ||= kafka_client.consumer(:group_id => GROUP_FOR_QUEUE_MESSAGES + topic)
|
27
29
|
end
|
28
30
|
|
29
31
|
trap("TERM") do
|
@@ -21,7 +21,7 @@ module ManageIQ
|
|
21
21
|
batch_options[:automatically_mark_as_processed] = auto_ack?(options)
|
22
22
|
batch_options[:max_bytes] = options[:max_bytes] if options.key?(:max_bytes)
|
23
23
|
|
24
|
-
consumer = queue_consumer
|
24
|
+
consumer = queue_consumer(topic)
|
25
25
|
consumer.subscribe(topic)
|
26
26
|
consumer.each_batch(batch_options) do |batch|
|
27
27
|
logger.info("Batch message received: queue(#{topic})")
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ManageIQ Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -202,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
202
202
|
version: '0'
|
203
203
|
requirements: []
|
204
204
|
rubyforge_project:
|
205
|
-
rubygems_version: 2.
|
205
|
+
rubygems_version: 2.7.6
|
206
206
|
signing_key:
|
207
207
|
specification_version: 4
|
208
208
|
summary: Client library for ManageIQ components to exchange messages through its internal
|